public class CryptManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static org.apache.logging.log4j.Logger |
LOGGER |
Constructor and Description |
---|
CryptManager() |
Modifier and Type | Method and Description |
---|---|
private static byte[] |
cipherOperation(int opMode,
java.security.Key key,
byte[] data) |
static javax.crypto.Cipher |
createNetCipherInstance(int opMode,
java.security.Key key) |
static javax.crypto.SecretKey |
createNewSharedKey() |
private static javax.crypto.Cipher |
createTheCipherInstance(int opMode,
java.lang.String transformation,
java.security.Key key) |
static java.security.PublicKey |
decodePublicKey(byte[] encodedKey) |
static byte[] |
decryptData(java.security.Key key,
byte[] data) |
static javax.crypto.SecretKey |
decryptSharedKey(java.security.PrivateKey key,
byte[] secretKeyEncrypted) |
private static byte[] |
digestOperation(java.lang.String algorithm,
byte[]... data) |
static byte[] |
encryptData(java.security.Key key,
byte[] data) |
static java.security.KeyPair |
generateKeyPair() |
static byte[] |
getServerIdHash(java.lang.String serverId,
java.security.PublicKey publicKey,
javax.crypto.SecretKey secretKey) |
public static javax.crypto.SecretKey createNewSharedKey()
public static java.security.KeyPair generateKeyPair()
public static byte[] getServerIdHash(java.lang.String serverId, java.security.PublicKey publicKey, javax.crypto.SecretKey secretKey)
private static byte[] digestOperation(java.lang.String algorithm, byte[]... data)
public static java.security.PublicKey decodePublicKey(byte[] encodedKey)
public static javax.crypto.SecretKey decryptSharedKey(java.security.PrivateKey key, byte[] secretKeyEncrypted)
public static byte[] encryptData(java.security.Key key, byte[] data)
public static byte[] decryptData(java.security.Key key, byte[] data)
private static byte[] cipherOperation(int opMode, java.security.Key key, byte[] data)
private static javax.crypto.Cipher createTheCipherInstance(int opMode, java.lang.String transformation, java.security.Key key)
public static javax.crypto.Cipher createNetCipherInstance(int opMode, java.security.Key key)