Android Guides | Samples

Android.Media.MediaDrm.CryptoSession Class

In addition to supporting decryption of DASH Common Encrypted Media, the MediaDrm APIs provide the ability to securely deliver session keys from an operator's session key server to a client device, based on the factory-installed root of trust, and then perform encrypt, decrypt, sign and verify operations with the session key on arbitrary user data.

See Also: MediaDrm+CryptoSession

Syntax

[Android.Runtime.Register("android/media/MediaDrm$CryptoSession", DoNotGenerateAcw=true)]
public sealed class MediaDrm.CryptoSession : Object

Remarks

In addition to supporting decryption of DASH Common Encrypted Media, the MediaDrm APIs provide the ability to securely deliver session keys from an operator's session key server to a client device, based on the factory-installed root of trust, and then perform encrypt, decrypt, sign and verify operations with the session key on arbitrary user data.

The CryptoSession class implements generic encrypt/decrypt/sign/verify methods based on the established session keys. These keys are exchanged using the getKeyRequest/provideKeyResponse methods.

Applications of this capability could include securing various types of purchased or private content, such as applications, books and other media, photos or media delivery protocols.

Operators can create session key servers that are functionally similar to a license key server, except that instead of receiving license key requests and providing encrypted content keys which are used specifically to decrypt A/V media content, the session key server receives session key requests and provides encrypted session keys which can be used for general purpose crypto operations.

A CryptoSession is obtained using MediaDrm.GetCryptoSession(Byte[],String,String)

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 18

The members of Android.Media.MediaDrm.CryptoSession are listed below.

See Also: Object

Protected Properties

[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

Decrypt(Byte[], Byte[], Byte[]) : Byte[]
Decrypt data using the CryptoSessions's cipher algorithm
Encrypt(Byte[], Byte[], Byte[]) : Byte[]
Encrypt data using the CryptoSession's cipher algorithm
Sign(Byte[], Byte[]) : Byte[]
Sign data using the CryptoSessions's mac algorithm.
Verify(Byte[], Byte[], Byte[]) : Boolean
Verify a signature using the CryptoSessions's mac algorithm.