Constructor and Description |
---|
DefaultCryptor()
Constructor for DefaultCryptor.
|
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String str)
decrypts the string
|
String |
encrypt(String str)
Encrypt the string
|
String |
newKey() |
public DefaultCryptor() throws NoSuchAlgorithmException, InvalidKeySpecException
public String encrypt(String str) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
encrypt
in interface Cryptor
NoSuchPaddingException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
public String decrypt(String str) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
Cryptor
decrypt
in interface Cryptor
NoSuchPaddingException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
Copyright © 2004-2017 The Apache Software Foundation. All Rights Reserved.