public final class XorCipher extends Object
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String value,
@NonNegative int keyOffset)
Decrypt the value using the current key
https://github.com/Emudofus/Dofus/blob/1.29/dofus/aks/Aks.as#L314
|
String |
encrypt(String value,
@NonNegative int keyOffset)
Encrypt the value using the current key
The encrypted value is an upper case hexadecimal string
https://github.com/Emudofus/Dofus/blob/1.29/dofus/aks/Aks.as#L297
|
@MinLen(value=1) String |
key()
Get the key used by the cipher
|
public XorCipher(@MinLen(value=1) String key)
@Pure public @MinLen(value=1) String key()
@SideEffectFree public String encrypt(String value, @NonNegative int keyOffset)
value - Value to encryptkeyOffset - Offset to use for the key@SideEffectFree public String decrypt(String value, @NonNegative int keyOffset)
value - Value to decrypt. Must be a valid hexadecimal stringkeyOffset - Offset to use on the key. Must be the same used for encryption.IllegalArgumentException - When an invalid string is givenNumberFormatException - When an invalid hexadecimal string is givenCopyright © 2022. All rights reserved.