forked from I2P_Developers/i2p.i2p
Merge branch 'fix/chacha' into 'master'
Fix wrong arguments order in ChaCha20 encrypt See merge request i2p-hackers/i2p.i2p!72 Broken in 1.8.0. Almost certainly broke LS2 encrypted leaseset, but not yet tested. Did not break anything else. I tested that this fix didn't break anything.
This commit is contained in:
@@ -47,7 +47,7 @@ public final class ChaCha20 {
|
|||||||
public static void encrypt(byte[] key, byte[] iv,
|
public static void encrypt(byte[] key, byte[] iv,
|
||||||
byte[] plaintext, int plaintextOffset,
|
byte[] plaintext, int plaintextOffset,
|
||||||
byte[] ciphertext, int ciphertextOffset, int length) {
|
byte[] ciphertext, int ciphertextOffset, int length) {
|
||||||
encrypt(key, iv, 0, ciphertext, ciphertextOffset, plaintext, plaintextOffset, length);
|
encrypt(key, iv, 0, plaintext, plaintextOffset, ciphertext, ciphertextOffset, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user