public class EncryptionUtil extends Object
| Constructor and Description |
|---|
EncryptionUtil(String encryptionAlgorithm,
int keySize) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] encryptedData,
KeyPair keypair,
SecretKey key) |
byte[] |
decrypt(byte[] encryptedData,
KeyPair keypair,
SecretKeySpec keySpec) |
byte[] |
decrypt(byte[] encryptedData,
SecretKeySpec keySpec) |
byte[] |
encrypt(byte[] data,
PublicKey publicKey,
SecretKey key) |
byte[] |
encrypt(byte[] data,
SecretKey key) |
SecretKey |
generateKey() |
public EncryptionUtil(String encryptionAlgorithm, int keySize)
public SecretKey generateKey() throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic byte[] encrypt(byte[] data,
PublicKey publicKey,
SecretKey key)
throws Exception
Exceptionpublic byte[] decrypt(byte[] encryptedData,
KeyPair keypair,
SecretKeySpec keySpec)
throws Exception
Exceptionpublic byte[] decrypt(byte[] encryptedData,
KeyPair keypair,
SecretKey key)
throws Exception
Exceptionpublic byte[] decrypt(byte[] encryptedData,
SecretKeySpec keySpec)
throws Exception
ExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.