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.
-
ident
-
-
PublicKeySecuredObject()
- general constructor used by externalisable.
-
PublicKeySecuredObject(Object, Cipher, SecureRandom)
- create a public key secured object using the standard algorithm
and the standard provider for the secret key.
-
PublicKeySecuredObject(Object, Cipher, SecureRandom, String, String)
- create a public key secured object.
-
getDecryptor()
- return a Cipher capable of decrypting another object encrypted
with the same secret key as this one.
-
getEncryptor()
- return a Cipher capable of encrypting another object with
the secret key used to encrypt this one.
-
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
PublicKeySecuredObject
public PublicKeySecuredObject()
- general constructor used by externalisable.
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.
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.
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 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.
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.
getDecryptor
public Cipher getDecryptor()
- return a Cipher capable of decrypting another object encrypted
with the same secret key as this one.
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