mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Use Cipher mode constants.
This commit is contained in:
parent
2a8483a155
commit
345df21061
1 changed files with 2 additions and 2 deletions
|
@ -54,11 +54,11 @@ public class CryptUtil {
|
|||
}
|
||||
|
||||
public static byte[] encryptData(Key key, byte[] data) {
|
||||
return runEncryption(1, key, data);
|
||||
return runEncryption(Cipher.ENCRYPT_MODE, key, data);
|
||||
}
|
||||
|
||||
public static byte[] decryptData(Key key, byte[] data) {
|
||||
return runEncryption(2, key, data);
|
||||
return runEncryption(Cipher.DECRYPT_MODE, key, data);
|
||||
}
|
||||
|
||||
private static byte[] runEncryption(int mode, Key key, byte[] data) {
|
||||
|
|
Loading…
Reference in a new issue