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.
-
ident
-
-
SecuredObject()
- base constructor needed for serialisation to work.
-
SecuredObject(Object, Cipher)
- create a secret key secured object.
-
getIV()
- returns a copy of the initialisation vector.
-
getObject(Cipher)
- Return the plain text object.
-
readExternal(ObjectInput)
-
-
writeExternal(ObjectOutput)
-
ident
public final static String ident
SecuredObject
public SecuredObject()
- base constructor needed for serialisation to work.
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.
getIV
public byte[] getIV()
- returns a copy of the initialisation vector.
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.
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
All Packages Class Hierarchy This Package Previous Next Index