Package emu.grasscutter.utils
Class Crypto
java.lang.Object
emu.grasscutter.utils.Crypto
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic byte[]static byte[]static byte[]static longstatic byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]createSessionKey(int length) static voidextractDispatchSeed(String data) static voidextractSecretKeyBuffer(byte[] data) static voidloadKeys()static voidxor(byte[] packet, byte[] key)
-
Field Details
-
DISPATCH_KEY
public static byte[] DISPATCH_KEY -
DISPATCH_SEED
public static byte[] DISPATCH_SEED -
ENCRYPT_KEY
public static byte[] ENCRYPT_KEY -
ENCRYPT_SEED
public static long ENCRYPT_SEED -
ENCRYPT_SEED_BUFFER
public static byte[] ENCRYPT_SEED_BUFFER
-
-
Constructor Details
-
Crypto
public Crypto()
-
-
Method Details
-
loadKeys
public static void loadKeys() -
xor
public static void xor(byte[] packet, byte[] key) -
extractSecretKeyBuffer
public static void extractSecretKeyBuffer(byte[] data) -
extractDispatchSeed
-
createSessionKey
public static byte[] createSessionKey(int length)
-