| Constructor and Description |
|---|
DefaultCryptor()
Constructor for DefaultCryptor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] bytes)
Decrypt the string
|
java.lang.String |
decrypt(java.lang.String str)
Decrypt the string
|
byte[] |
encrypt(byte[] bytes)
Encrypt the string
|
java.lang.String |
encrypt(java.lang.String str)
Encrypt the string
|
static void |
main(java.lang.String[] args) |
public DefaultCryptor()
throws java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException
java.security.NoSuchAlgorithmExceptionjava.security.spec.InvalidKeySpecExceptionpublic java.lang.String encrypt(java.lang.String str)
throws javax.crypto.NoSuchPaddingException,
java.security.NoSuchAlgorithmException,
java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
public byte[] encrypt(byte[] bytes)
throws javax.crypto.NoSuchPaddingException,
java.security.NoSuchAlgorithmException,
java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
Cryptorpublic java.lang.String decrypt(java.lang.String str)
throws javax.crypto.NoSuchPaddingException,
java.security.NoSuchAlgorithmException,
java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
public byte[] decrypt(byte[] bytes)
throws javax.crypto.NoSuchPaddingException,
java.security.NoSuchAlgorithmException,
java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
Cryptorpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.ExceptionCopyright ? 2003 Apache Software Foundation. All rights reserved.