de.innovationgate.utils.security
public class SymmetricEncryptionEngine extends java.lang.Object
Constructor and Description |
---|
SymmetricEncryptionEngine() |
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] input) |
byte[] |
decryptBase64Web(java.lang.String input) |
byte[] |
encrypt(byte[] input) |
java.lang.String |
encryptBase64Web(byte[] input) |
javax.crypto.SecretKey |
generateKey() |
javax.crypto.Cipher |
getDecryptionCipher() |
javax.crypto.Cipher |
getEncryptionCipher() |
javax.crypto.spec.SecretKeySpec |
getKeySpec() |
java.lang.String |
getTransformation() |
void |
init(byte[] key) |
public javax.crypto.SecretKey generateKey() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public void init(byte[] key) throws java.security.GeneralSecurityException, java.io.UnsupportedEncodingException
java.security.GeneralSecurityException
java.io.UnsupportedEncodingException
public byte[] encrypt(byte[] input) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public byte[] decrypt(byte[] input) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public java.lang.String encryptBase64Web(byte[] input) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public byte[] decryptBase64Web(java.lang.String input) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
public javax.crypto.Cipher getEncryptionCipher() throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public javax.crypto.Cipher getDecryptionCipher() throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public javax.crypto.spec.SecretKeySpec getKeySpec()
public java.lang.String getTransformation()