public class CryptManager
extends java.lang.Object
Constructor and Description |
---|
CryptManager() |
Modifier and Type | Method and Description |
---|---|
static javax.crypto.Cipher |
createNetCipherInstance(int opMode,
java.security.Key key) |
static javax.crypto.SecretKey |
createNewSharedKey() |
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) |
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)
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)
public static javax.crypto.Cipher createNetCipherInstance(int opMode, java.security.Key key)