DAS React Native

Namespace: DASC

DASC

The DASC class

Members

static,readonly DASC.exports.DASDRMSchemeString

Enum for DAS drm scheme.

Properties:
Name Type Default Description
WIDEVINE String Widevine

Widevine DRM

PLAYREADY String Playready

PlayReady DRM

FAIRPLAY String Fairplay

FairPlay DRM

CONNECTDRM String Connect

Connect DRM

TVKEY String TVKey

TVKey DRM

Methods

staticDASC.close(){Promise.<number>}

Close the DAS Session to release the allocated resources.

Returns:
Type Description
Promise.<number> A promise with number to indicate close success(0)/failure.

staticDASC.decrypt(inputBuffer, keyid, iv){Promise.<ResponseData>}

Decrypt the input data with key of the session and return the output data and status.

Name Type Description
inputBuffer String

The input raw data for encryption.

keyid String

The key id used for crypto operations.

iv String

The initial vectore used for data encryption.

Returns:
Type Description
Promise.<ResponseData> A promise with the decrypted data.

staticDASC.encrypt(inputBuffer, keyid, iv){Promise.<ResponseData>}

Encrypt the input data with key of the session.

Name Type Description
inputBuffer String

The input raw data for encryption.

keyid String

The key id used for crypto operations.

iv String

The initial vectore used for data encryption.

Returns:
Type Description
Promise.<ResponseData> A promise with encrypted data.

staticDASC.getDeviceAuthenticationData(){Promise.<ResponseData>}

Get the device authentication data which is used for device authentication and key exchange.

Returns:
Type Description
Promise.<ResponseData> A promise with response object number, string representing status and authentication data.

staticDASC.importlicense(license){Promise.<number>}

Import license to device for DAS session.

Name Type Description
license String

The license data parsed from server key exchange response.

Returns:
Type Description
Promise.<number> A promise with number to indicate import success(0)/failure.

staticDASC.open(operatorData, drmScheme){Promise.<number>}

Open DAS session.

Name Type Description
operatorData String

The certificate used for device authentication and key exchange.

drmScheme String

The DRM scheme preferred for DAS.

Returns:
Type Description
Promise.<number> A promise with number to indicate open success(0)/failure(1).

staticDASC.sign(inputBuffer, keyid){Promise.<ResponseData>}

Sign the data using the key of the session and return the signature and status.

Name Type Description
inputBuffer String

The input raw data for signing

keyid String

The key id used for crypto operations.

Returns:
Type Description
Promise.<ResponseData> A promise with generated signature.

staticDASC.verify(inputBuffer, signature, keyid){Promise.<number>}

Verify the signature of the data using the key of the session and return the status.

Name Type Description
inputBuffer String

The input raw data for signature verification.

signature String

The signature of the data for verifying.

keyid String

The key id used for crypto operations.

Returns:
Type Description
Promise.<number> A promise with verify status

Type Definitions

DASC.ResponseData

Properties:
Name Type Description
status number

Status

data string

Data