|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javax.crypto.SealedObject
Class for cryptographic "sealing" a serialized object.
Attention: This is not a SUN implementation!
This class has been developed by IAIK according to the documentation publically available.
For SUNīs documentation of this class see
http://java.sun.com/security/JCE1.2/spec/apidoc/index.html
This class can be used for protecting the confidentiality of a Serializable object.
For protecting the Serializable object, create a SealedObject by calling the constructor
with the given Serializable object and the Cipher to be used for encrypting.
For decrypting - and deserializing - the encrypted object again, use the
getobject(Cipher cipher) method, where now the Cipher is initialized for
decryptiion.
getObject(javax.crypto.Cipher), Serialized Form| Constructor Summary | |
SealedObject(java.io.Serializable object,
Cipher c)
Creates a SealedObject from the given Serializable object using the given Cipher for encryption. |
|
| Method Summary | |
java.lang.String |
getAlgorithm()
Returns the algorithm that was used to seal this object. |
java.lang.Object |
getObject(Cipher c)
Returns he original Serializable object from which this SealedObject has been created. |
java.lang.Object |
getObject(Key key)
Retrieves the original (encapsulated) object. |
java.lang.Object |
getObject(Key key,
java.lang.String provider)
Retrieves the original (encapsulated) object. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public SealedObject(java.io.Serializable object,
Cipher c)
throws java.io.IOException,
IllegalBlockSizeException
object - the Serializeable object to be sealedc - the cipher used for sealing, initialized for encryption| Method Detail |
public final java.lang.String getAlgorithm()
public final java.lang.Object getObject(Cipher c)
throws java.io.IOException,
java.lang.ClassNotFoundException,
IllegalBlockSizeException,
BadPaddingException
c - the cipher used for unsealing, initialized for decryption
public final java.lang.Object getObject(Key key)
throws java.io.IOException,
java.lang.ClassNotFoundException,
NoSuchAlgorithmException,
InvalidKeyException
key - the key used to unseal the object
public final java.lang.Object getObject(Key key,
java.lang.String provider)
throws java.io.IOException,
java.lang.ClassNotFoundException,
NoSuchAlgorithmException,
NoSuchProviderException,
InvalidKeyException
key - the key used to unseal the objectprovider - the name of the provider of the algorithm to unseal the object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||