public class CertificateGenEncryptUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
KEY_SIZE |
static String |
PUBLIC_KEY_ALGORITHM |
static String |
SINGLE_KEY_ALGORITHM |
static String |
TRANSMISSION_CIPHER_PARAMS |
Constructor and Description |
---|
CertificateGenEncryptUtil() |
Modifier and Type | Method and Description |
---|---|
static Key |
decodeTransmittedKey(byte[] sessionKey,
byte[] transmittedKey,
boolean privateKey) |
static byte[] |
decryptUsingKey(byte[] data,
Key key) |
static byte[] |
encodeKeyForTransmission(Key encodingKey,
Key keyToEncode) |
static byte[] |
encryptUsingKey(byte[] data,
Key key) |
static KeyPair |
generateKeyPair() |
static Key |
generateSingleKey() |
static Cipher |
initDecryptionCipher(Key unwrappedKey,
byte[] unencryptedKey) |
public static final int KEY_SIZE
public static final String PUBLIC_KEY_ALGORITHM
public static final String SINGLE_KEY_ALGORITHM
public static final String TRANSMISSION_CIPHER_PARAMS
public static KeyPair generateKeyPair()
public static Key generateSingleKey() throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static byte[] encodeKeyForTransmission(Key encodingKey, Key keyToEncode) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException
public static Key decodeTransmittedKey(byte[] sessionKey, byte[] transmittedKey, boolean privateKey) throws InvalidKeySpecException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException
public static Cipher initDecryptionCipher(Key unwrappedKey, byte[] unencryptedKey) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException
public static byte[] encryptUsingKey(byte[] data, Key key)
public static byte[] decryptUsingKey(byte[] data, Key key)
Copyright © 2020 Hitachi Vantara. All rights reserved.