public final class AesCipher extends Object implements FloodgateCipher
FloodgateCipher.HeaderResult| Modifier and Type | Field and Description |
|---|---|
static int |
IV_LENGTH |
HEADER_LENGTH, IDENTIFIER| Constructor and Description |
|---|
AesCipher() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] cipherTextWithIv)
Decrypts the given data using the Key provided in
FloodgateCipher.init(Key) |
byte[] |
encrypt(byte[] data)
Encrypts the given data using the Key provided in
FloodgateCipher.init(Key) |
void |
init(Key key)
Initializes the instance by giving it the key it needs to encrypt or decrypt data
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckHeader, decryptFromString, decryptToString, encryptFromString, hasHeaderpublic static final int IV_LENGTH
public void init(Key key)
FloodgateCipherinit in interface FloodgateCipherkey - the key used to encrypt and decrypt datapublic byte[] encrypt(byte[] data)
throws Exception
FloodgateCipherFloodgateCipher.init(Key)encrypt in interface FloodgateCipherdata - the data to encryptException - when the encryption failedpublic byte[] decrypt(byte[] cipherTextWithIv)
throws Exception
FloodgateCipherFloodgateCipher.init(Key)decrypt in interface FloodgateCiphercipherTextWithIv - the data to decryptException - when the decrypting failedCopyright © 2021 GeyserMC. All rights reserved.