| Constructor and Description |
|---|
SimpleEncryptor(String privateKey)
Default constructor.
|
public SimpleEncryptor(String privateKey)
privateKey - The private key.public String encrypt(String string) throws UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException, InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidAlgorithmParameterException
encrypt in interface GenericEncryptor<String,String>string - The String to encrypt.UnsupportedEncodingException - is thrown if get the bytes from the given String object fails.BadPaddingException - is thrown if Cipher.doFinal(byte[]) fails.IllegalBlockSizeException - is thrown if Cipher.doFinal(byte[]) fails.InvalidAlgorithmParameterException - is thrown if initialization of the cypher object fails.NoSuchPaddingException - is thrown if instantiation of the cypher object fails.InvalidKeySpecException - is thrown if generation of the SecretKey object fails.NoSuchAlgorithmException - is thrown if instantiation of the SecretKeyFactory object fails.InvalidKeyException - is thrown if initialization of the cypher object fails.Copyright © 2015–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.