public class EncryptionUtil extends Object
Modifier and Type | Field and Description |
---|---|
static KeyPair |
keys |
static NativeCode<BungeeCipher> |
nativeFactory |
Constructor and Description |
---|
EncryptionUtil() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
encrypt(Key key,
byte[] b) |
static EncryptionRequest |
encryptRequest() |
static BungeeCipher |
getCipher(boolean forEncryption,
SecretKey shared) |
static PublicKey |
getPubkey(EncryptionRequest request) |
static SecretKey |
getSecret(EncryptionResponse resp,
EncryptionRequest request) |
public static final KeyPair keys
public static final NativeCode<BungeeCipher> nativeFactory
public static EncryptionRequest encryptRequest()
public static SecretKey getSecret(EncryptionResponse resp, EncryptionRequest request) throws GeneralSecurityException
GeneralSecurityException
public static BungeeCipher getCipher(boolean forEncryption, SecretKey shared) throws GeneralSecurityException
GeneralSecurityException
public static PublicKey getPubkey(EncryptionRequest request) throws GeneralSecurityException
GeneralSecurityException
public static byte[] encrypt(Key key, byte[] b) throws GeneralSecurityException
GeneralSecurityException
Copyright © 2012–2020 SpigotMC. All rights reserved.