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

Class au.net.aba.crypto.SecuredObject

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

public class SecuredObject
extends Object
implements Externalizable
a holding class for encrypted objects which have a verification hash attached.

Variable Index

 o ident

Constructor Index

 o SecuredObject()
base constructor needed for serialisation to work.
 o SecuredObject(Object, Cipher)
create a secret key secured object.

Method Index

 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 SecuredObject
  public SecuredObject()
base constructor needed for serialisation to work.
 o SecuredObject
  public SecuredObject(Object obj,
                       Cipher cipher) throws IOException
create a secret key secured object. The object is appended with a SHA-1 digest, and the system time is written at the front of the stream to remove the likelihood of two objects encrypting to the same or similar streams.

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 to be used to decrypt the object.
Returns:
The object that was encrypted.
Throws: ClassNotFoundException
The object class could not be loaded.
 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