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