public class TripleDESCrytor extends Object implements Cryptor
| Constructor and Description |
|---|
TripleDESCrytor()
default constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String str)
decrypts the string
|
String |
encrypt(String clear)
Encrypt the string, if unable to encrypt, return null
|
static String |
GEN()
generates a new key
|
String |
newKey() |
public String encrypt(String clear) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
Cryptorencrypt in interface CryptorNoSuchPaddingExceptionNoSuchAlgorithmExceptionInvalidAlgorithmParameterExceptionInvalidKeyExceptionIllegalBlockSizeExceptionBadPaddingExceptionpublic static String GEN()
public String decrypt(String str) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
Cryptordecrypt in interface CryptorNoSuchPaddingExceptionNoSuchAlgorithmExceptionInvalidAlgorithmParameterExceptionInvalidKeyExceptionIllegalBlockSizeExceptionBadPaddingExceptionCopyright © 2004–2021 The Apache Software Foundation. All rights reserved.