net.sourceforge.jaulp.crypto
Class SimpleDecryptor

java.lang.Object
  extended by net.sourceforge.jaulp.crypto.SimpleDecryptor
All Implemented Interfaces:
Decryptor, SecretCryptor

public class SimpleDecryptor
extends java.lang.Object
implements Decryptor

A simple Decryptor object.

Version:
1.0
Author:
Asterios Raptis

Constructor Summary
SimpleDecryptor()
          Default constructor.
SimpleDecryptor(java.lang.String privateKey)
          Constructor with a private key.
 
Method Summary
 java.lang.String decrypt(java.lang.String str)
          Decrpyt the donated String.
 javax.crypto.Cipher getCipher()
          Returns the cipher from the SecretCryptor object.
 java.lang.String getPrivateKey()
          Returns the private key from the SecretCryptor object.
 void setCipher(javax.crypto.Cipher decryptCipher)
          Sets the cipher from the SecretCryptor object.
 void setPrivateKey(java.lang.String privateKey)
          Sets the private key from the SecretCryptor object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDecryptor

public SimpleDecryptor()
Default constructor.


SimpleDecryptor

public SimpleDecryptor(java.lang.String privateKey)
Constructor with a private key.

Parameters:
privateKey - The private key.
Method Detail

decrypt

public java.lang.String decrypt(java.lang.String str)
Decrpyt the donated String.

Specified by:
decrypt in interface Decryptor
Parameters:
str - The String to decrypt.
Returns:
The decrypted String.s
See Also:
Decryptor.decrypt(java.lang.String)

getCipher

public javax.crypto.Cipher getCipher()
Returns the cipher from the SecretCryptor object.

Specified by:
getCipher in interface SecretCryptor
Returns:
Returns the cipher from the SecretCryptor object.
See Also:
SecretCryptor.getCipher()

getPrivateKey

public java.lang.String getPrivateKey()
Returns the private key from the SecretCryptor object.

Specified by:
getPrivateKey in interface SecretCryptor
Returns:
Returns the private key from the SecretCryptor object.
See Also:
SecretCryptor.getPrivateKey()

setCipher

public void setCipher(javax.crypto.Cipher decryptCipher)
Sets the cipher from the SecretCryptor object.

Specified by:
setCipher in interface SecretCryptor
Parameters:
decryptCipher - The cipher to set.
See Also:
SecretCryptor.setCipher(javax.crypto.Cipher)

setPrivateKey

public void setPrivateKey(java.lang.String privateKey)
Sets the private key from the SecretCryptor object.

Specified by:
setPrivateKey in interface SecretCryptor
Parameters:
privateKey - The private key to set.
See Also:
SecretCryptor.setPrivateKey(java.lang.String)


Copyright © 2010. All Rights Reserved.