MCPcopy Create free account
hub / github.com/e2wugui/zeze / Decrypt

Method Decrypt

ZezeJava/ZezeJava/src/main/java/Zeze/Net/Decrypt.java:19–33  ·  view source on GitHub ↗
(@NotNull Codec sink, byte @NotNull [] key)

Source from the content-addressed store, hash-verified

17 private int count = 0;
18
19 public Decrypt(@NotNull Codec sink, byte @NotNull [] key) throws CodecException {
20 this.sink = sink;
21 iv = new byte[16];
22 in = new byte[16];
23 out = new byte[16];
24 System.arraycopy(Digest.md5(key), 0, iv, 0, 16);
25 ivr = ByteBuffer.wrap(iv);
26 ivw = ByteBuffer.wrap(iv);
27 try {
28 cipher = Cipher.getInstance("AES/ECB/NoPadding");
29 cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(iv, "AES"));
30 } catch (Exception e) {
31 throw new CodecException(e);
32 }
33 }
34
35 private void succeed() {
36 try {

Callers

nothing calls this directly

Calls 4

md5Method · 0.95
wrapMethod · 0.95
initMethod · 0.65
getInstanceMethod · 0.45

Tested by

no test coverage detected