public class CryptUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static PublicKey |
decodePublicKey(byte[] bytes) |
static byte[] |
decryptData(Key key,
byte[] data) |
static SecretKey |
decryptSharedKey(PrivateKey privateKey,
byte[] sharedKey) |
static byte[] |
encryptData(Key key,
byte[] data) |
static KeyPair |
generateKeyPair() |
static SecretKey |
generateSharedKey() |
static byte[] |
getServerIdHash(String serverId,
PublicKey publicKey,
SecretKey secretKey) |
public static SecretKey generateSharedKey()
public static KeyPair generateKeyPair()
public static PublicKey decodePublicKey(byte[] bytes) throws IOException
IOExceptionpublic static SecretKey decryptSharedKey(PrivateKey privateKey, byte[] sharedKey)
public static byte[] encryptData(Key key, byte[] data)
public static byte[] decryptData(Key key, byte[] data)
Copyright © 2020. All rights reserved.