Using U code to generate random garbled names

未关闭
#165 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
android, java

调研方向

No project files, tests, or integration point are named. Start by reading the project structure and locating where names are entered or generated; clarify how this feature should fit into the app before making changes. Done should include a way to generate names of a specified length using the Unicode ranges described in the issue, with behavior verified in the relevant tests.

由索引模型根据 Issue 内容生成。

描述

Use a two-dimensional array to store two U code ranges, random generates random numbers to select U code ranges, and loops to generate characters of a specified length to generate obfuscated names.

import java.util.Random;

public class Name_Factory {
private static final int[][] UNICODE_RANGES = {
    {0x0100, 0x017F}, // Latin Extended-A
    {0x0370, 0x03FF}, // Greek and Coptic
    {0x0400, 0x04FF}  // Cyrillic alphabet
};
    public static String generateGlitchName(int length) {
        Random random = new Random();
        StringBuilder glitchName = new StringBuilder();

        for (int i = 0; i < length; i++) {
            // Randomly select a Unicode range
            int[] range = UNICODE_RANGES[random.nextInt(UNICODE_RANGES.length)];
            int start = range[0];
            int end = range[1];

            // Generate a random character
            int codePoint = random.nextInt(end - start + 1) + start;
            glitchName.append(Character.toChars(codePoint));
        }

        return glitchName.toString();
    }   
}
Details

Image

demo.apk.zip

主要语言
Java
星标
2.3k
派生
417
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

REAndroid/APKEditor 的其他 Issue

查看 REAndroid/APKEditor 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。