MCPcopy Index your code
hub / github.com/Q16G/memory-shell / xorProcess

Method xorProcess

src/main/java/org/example/tlv.java:20–29  ·  view source on GitHub ↗
(byte[] data)

Source from the content-addressed store, hash-verified

18
19 // XOR加密/解密方法
20 public static byte[] xorProcess(byte[] data) {
21 if (data == null || data.length == 0) {
22 return data;
23 }
24 byte[] result = new byte[data.length];
25 for (int i = 0; i < data.length; i++) {
26 result[i] = (byte) (data[i] ^ XOR_KEY[i % XOR_KEY.length]);
27 }
28 return result;
29 }
30
31 public static void main(String[] args) {
32 byte[] encode = new Request((byte) 0x00, null).encode();

Callers 5

encodeMethod · 0.80
decodeMethod · 0.80
encodeMethod · 0.80
decodeMethod · 0.80
processMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected