public class SimpleEncryptor extends Object implements StringEncryptor, Cryptor
SimpleEncryptor is a simple StringEncryptor implementation.| Constructor and Description |
|---|
SimpleEncryptor(String privateKey)
Instantiates a new
SimpleEncryptor with the given private key. |
| Modifier and Type | Method and Description |
|---|---|
String |
encrypt(String string)
Encrypt the given object.
|
int |
newOperationMode()
Factory callback method for get the operation mode. the operation mode can be one of the
following values: ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE or UNWRAP_MODE
|
public SimpleEncryptor(String privateKey)
SimpleEncryptor with the given private key.privateKey - The private key.public String encrypt(String string) throws UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException, InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidAlgorithmParameterException
encrypt in interface Encryptor<String,String>string - The object to encrypt.UnsupportedEncodingExceptionIllegalBlockSizeExceptionBadPaddingExceptionInvalidKeyExceptionNoSuchAlgorithmExceptionInvalidKeySpecExceptionNoSuchPaddingExceptionInvalidAlgorithmParameterExceptionpublic int newOperationMode()
newOperationMode in interface CryptorCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.