public class PrivateKeyHexDecryptor extends Object
PrivateKeyHexDecryptor decrypts encrypted characters the was encrypted with the
public key of the pendant private key of this class.| Constructor and Description |
|---|
PrivateKeyHexDecryptor(PrivateKey privateKey)
Instantiates a new
PrivateKeyHexDecryptor with the given PrivateKey. |
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String encypted)
Decrypt the given encrypted String.
|
public PrivateKeyHexDecryptor(PrivateKey privateKey)
PrivateKeyHexDecryptor with the given PrivateKey.privateKey - The private key.public String decrypt(String encypted) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, org.apache.commons.codec.DecoderException, IllegalBlockSizeException, BadPaddingException, InvalidKeySpecException, InvalidAlgorithmParameterException, IOException
encypted - The String to decrypt.NoSuchAlgorithmException - is thrown if instantiation of the cypher object fails.NoSuchPaddingException - is thrown if instantiation of the cypher object fails.InvalidKeyException - the invalid key exception is thrown if initialization of the cypher object fails.org.apache.commons.codec.DecoderException - is thrown if an odd number or illegal of characters is suppliedIllegalBlockSizeException - is thrown if Cipher.doFinal(byte[]) fails.BadPaddingException - is thrown if Cipher.doFinal(byte[]) fails.InvalidKeySpecException - is thrown if generation of the SecretKey object fails.IOException - Signals that an I/O exception has occurred.InvalidAlgorithmParameterException - is thrown if initialization of the cypher object fails.Copyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.