Android Guides | Samples

Javax.Crypto.SealedObject Class

A SealedObject is a wrapper around a serializable object instance and encrypts it using a cryptographic cipher.

See Also: SealedObject

Syntax

[Android.Runtime.Register("javax/crypto/SealedObject", DoNotGenerateAcw=true)]
public class SealedObject : Object, ISerializable, IDisposable

Remarks

A SealedObject is a wrapper around a serializable object instance and encrypts it using a cryptographic cipher.

Since a SealedObject instance is serializable it can either be stored or transmitted over an insecure channel.

The wrapped object can later be decrypted (unsealed) using the corresponding key and then be deserialized to retrieve the original object. The sealed object itself keeps track of the cipher and corresponding parameters.

[Android Documentation]

Requirements

Namespace: Javax.Crypto
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Javax.Crypto.SealedObject are listed below.

See Also: Object

Public Constructors

Creates a new SealedObject instance wrapping the specified object and sealing it using the specified cipher.

Protected Constructors

Creates a new SealedObject instance by copying the data from the specified object.
A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
AlgorithmString. Returns the algorithm this object was sealed with.

Protected Properties

EncodedParamsIList<byte>. The cipher's AlgorithmParameters in encoded format.
[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

GetObject(IKey) : Object
Returns the wrapped object, decrypting it using the specified key.
GetObject(Cipher) : Object
Returns the wrapped object, decrypting it using the specified cipher.
GetObject(IKey, String) : Object
Returns the wrapped object, decrypting it using the specified key.