Constructs a SealedObject from any Serializable object.
The given object is serialized, and its serialized contents are encrypted using the given Cipher, which must be fully initialized.
Any algorithm parameters that may be used in the encryption
operation are stored inside of the new SealedObject
.
object | the object to be sealed; can be null. | |
c | the cipher used to seal the object. |
NullPointerException | if the given cipher is null. | |
IOException | if an error occurs during serialization | |
IllegalBlockSizeException | if the given cipher is a block cipher, no padding has been requested, and the total input length (i.e., the length of the serialized object contents) is not a multiple of the cipher's block size |
Diagram: SealedObject