Class au.net.aba.crypto.PublicKeySecuredObject
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class au.net.aba.crypto.PublicKeySecuredObject

java.lang.Object
   |
   +----au.net.aba.crypto.PublicKeySecuredObject

public class PublicKeySecuredObject
extends Object
implements Externalizable
A holding class for secret key encrypted objects which have their secret keys attached. The secret key is encrypted using some other algorithm.

Variable Index

 o ident

Constructor Index

 o PublicKeySecuredObject()
general constructor used by externalisable.
 o PublicKeySecuredObject(Object, Cipher, SecureRandom)
create a public key secured object using the standard algorithm and the standard provider for the secret key.
 o PublicKeySecuredObject(Object, Cipher, SecureRandom, String, String)
create a public key secured object.

Method Index

 o getDecryptor()
return a Cipher capable of decrypting another object encrypted with the same secret key as this one.
 o getEncryptor()
return a Cipher capable of encrypting another object with the secret key used to encrypt this one.
 o getIV()
returns a copy of the initialisation vector.
 o getObject(Cipher)
Return the plain text object.
 o readExternal(ObjectInput)
 o writeExternal(ObjectOutput)

Variables

 o ident
  public final static String ident

Constructors

 o PublicKeySecuredObject
  public PublicKeySecuredObject()
general constructor used by externalisable.
 o PublicKeySecuredObject
  public PublicKeySecuredObject(Object obj,
                                Cipher cipher,
                                SecureRandom random,
                                String algorithm,
                                String provider) throws IOException
create a public key secured object. The object is encrypted with a secret key and the secret key is encrypted with the cipher passed in.
 o PublicKeySecuredObject
  public PublicKeySecuredObject(Object obj,
                                Cipher cipher,
                                SecureRandom random) throws IOException
create a public key secured object using the standard algorithm and the standard provider for the secret key. The object is encrypted with the secret key and the secret key is encrypted with the cipher passed in.

Methods

 o getIV
  public byte[] getIV()
returns a copy of the initialisation vector.
 o getObject
  public Object getObject(Cipher cipher) throws IOException, ClassNotFoundException
Return the plain text object.
Parameters:
cipher - The Cipher used to decrypt the secret key and allow decryption of the object.
Returns:
the plain text object.
Throws: ClassNotFoundException
The object class could not be loaded.
 o getEncryptor
  public Cipher getEncryptor()
return a Cipher capable of encrypting another object with the secret key used to encrypt this one. Note: in the event you are dealing with an object constructed by someone else, this call is only meaningful if you have decrypted the object.
 o getDecryptor
  public Cipher getDecryptor()
return a Cipher capable of decrypting another object encrypted with the same secret key as this one.
 o writeExternal
  public void writeExternal(ObjectOutput out) throws IOException
 o readExternal
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

All Packages  Class Hierarchy  This Package  Previous  Next  Index