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, UnsupportedEncodingException
encrypt
in interface Cryptor
NoSuchPaddingException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
UnsupportedEncodingException
public String decrypt(String str) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException
Cryptor
decrypt
in interface Cryptor
NoSuchPaddingException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
UnsupportedEncodingException
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.