|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--au.net.aba.crypto.PublicKeySecuredObject
a holding class for secret key encrypted objects which have their secret keys attached. The secret key is encrypted using some other algorithm.
Field Summary | |
static java.lang.String |
ident
|
Constructor Summary | |
PublicKeySecuredObject()
general constructor used by externalisable. |
|
PublicKeySecuredObject(java.lang.Object obj,
Cipher cipher,
java.security.SecureRandom random)
create a public key secured object using the standard algorithm and the standard provider for the secret key. |
|
PublicKeySecuredObject(java.lang.Object obj,
Cipher cipher,
java.security.SecureRandom random,
java.lang.String algorithm,
java.lang.String provider)
create a public key secured object. |
Method Summary | |
Cipher |
getDecryptor()
return a Cipher capable of decrypting another object encrypted with the same secret key as this one. |
Cipher |
getEncryptor()
return a Cipher capable of encrypting another object with the secret key used to encrypt this one. |
byte[] |
getIV()
returns a copy of the initialisation vector. |
java.lang.Object |
getObject(Cipher cipher)
Return the plain text object. |
void |
readExternal(java.io.ObjectInput in)
serialisation support using Externalizable. |
void |
writeExternal(java.io.ObjectOutput out)
serialisation support using Externalizable. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String ident
Constructor Detail |
public PublicKeySecuredObject()
public PublicKeySecuredObject(java.lang.Object obj, Cipher cipher, java.security.SecureRandom random, java.lang.String algorithm, java.lang.String provider) throws java.io.IOException
obj
- a serialisable object to be encrypted.cipher
- the cipher to be used for encrypting the
secret key.random
- a random source for generating the secret
key.algorithm
- the name of the algorithm that the object will
be encrypted with.provider
- the provider name for the object encryption
algorithm.public PublicKeySecuredObject(java.lang.Object obj, Cipher cipher, java.security.SecureRandom random) throws java.io.IOException
obj
- a serialisable object to be encrypted.cipher
- the cipher to be used for encrypting the
secret key.random
- a random source for generating the secret
key.Method Detail |
public byte[] getIV()
public java.lang.Object getObject(Cipher cipher) throws java.io.IOException, java.lang.ClassNotFoundException
cipher
- The cipher used to decrypt the secret key and
allow the decryption of the object.public Cipher getEncryptor()
public Cipher getDecryptor()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
out
- the object output stream.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- the object input stream.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |