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