Files
OpenZen/src/main/java/shit/zen/utils/ByteCipher.java
T
Shirona1337andClaude Opus 4.7 41f3d972b8 refactor: rename Procyon-style locals to readable names
Rename ~2887 unreadable Procyon-decompiler locals/params (f/f2/fN,
n/n2, bl/bl2, nArray, bufferedImage, etc.) across 169 files to
context-aware camelCase identifiers (x, y, width, height, alpha,
color, sensitivity, etc.). Logic, control flow, field/method names
and method signatures (types/arity) are preserved; only local
variable and parameter names changed.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-21 19:21:20 +08:00

32 lines
844 B
Java

package shit.zen.utils;
import java.security.SecureRandom;
import java.util.Arrays;
public class ByteCipher {
private final byte[] key;
public ByteCipher(byte[] keyBytes) {
this.key = Arrays.copyOf(keyBytes, keyBytes.length);
}
public byte[] encrypt(byte[] input, int shift) {
byte[] output = new byte[input.length];
for (int i = 0; i < input.length; ++i) {
output[i] = (byte)(input[i] + this.key[i % this.key.length] + shift);
}
return output;
}
public byte[] decrypt(byte[] input, int shift) {
byte[] output = new byte[input.length];
for (int i = 0; i < input.length; ++i) {
output[i] = (byte)(input[i] - this.key[i % this.key.length] - shift);
}
return output;
}
static {
new SecureRandom();
}
}