| Constructor and Description |
|---|
HexEncryptor(String privateKey)
Default constructor.
|
HexEncryptor(String privateKey,
Algorithm algorithm)
Default constructor.
|
public HexEncryptor(String privateKey)
privateKey - The private key.public String encrypt(String string) throws InvalidKeyException, UnsupportedEncodingException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException
encrypt in interface Encryptorstring - The String to encrypt.InvalidKeyException - the invalid key exception is thrown if initialization of the cypher object fails.UnsupportedEncodingException - is thrown by get the byte array of the private key String object fails.NoSuchAlgorithmException - is thrown if instantiation of the cypher object fails.NoSuchPaddingException - is thrown if instantiation of the cypher object fails.IllegalBlockSizeException - is thrown if Cipher.doFinal(byte[]) fails.BadPaddingException - is thrown if Cipher.doFinal(byte[]) fails.Encryptor.encrypt(java.lang.String)Copyright © 2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.