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
NoSuchAlgorithmException
public byte[] encrypt(byte[] data, PublicKey publicKey, SecretKey key) throws Exception
Exception
public byte[] decrypt(byte[] encryptedData, KeyPair keypair, SecretKeySpec keySpec) throws Exception
Exception
public byte[] decrypt(byte[] encryptedData, KeyPair keypair, SecretKey key) throws Exception
Exception
public byte[] decrypt(byte[] encryptedData, SecretKeySpec keySpec) throws Exception
Exception
Copyright © 2017 JBoss by Red Hat. All rights reserved.