The DASC class
Members
-
static,readonly DASC.exports.DASDRMSchemeString
Enum for DAS drm scheme.
-
Properties:
Name Type Default Description WIDEVINEString Widevine Widevine DRM
PLAYREADYString Playready PlayReady DRM
FAIRPLAYString Fairplay FairPlay DRM
CONNECTDRMString Connect Connect DRM
TVKEYString 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 inputBufferString The input raw data for encryption.
keyidString The key id used for crypto operations.
ivString 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 inputBufferString The input raw data for encryption.
keyidString The key id used for crypto operations.
ivString 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 licenseString 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 operatorDataString The certificate used for device authentication and key exchange.
drmSchemeString 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 inputBufferString The input raw data for signing
keyidString 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 inputBufferString The input raw data for signature verification.
signatureString The signature of the data for verifying.
keyidString 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 statusnumber Status
datastring Data