Package: android.hardware.drm@1.0

ICryptoFactory

interface ICryptoFactory

Ref:frameworks/native/include/media/hardware/CryptoAPI.h:CryptoFactory

ICryptoFactory is the main entry point for interacting with a vendor's crypto HAL to create crypto plugins.Crypto plugins create crypto sessions which are used by a codec to decrypt protected video content.

Methods

isCryptoSchemeSupported

isCryptoSchemeSupported (uint8_t[16] uuid)
generates (bool isSupported)

Determine if a crypto scheme is supported by this HAL

Details
Parameters
uuid
identifies the crypto scheme in question
Generates
isSupported
must be true only if the scheme is supported

createPlugin

createPlugin (uint8_t[16] uuid, vec<uint8_t> initData)
generates (Status status, ICryptoPlugin cryptoPlugin)

Create a crypto plugin for the specified uuid and scheme-specific initialization data.

Details
Parameters
uuid
uniquely identifies the drm scheme.See http ://dashif.org/identifiers/protection for uuid assignments
initData
scheme-specific init data.
Generates
status
the status of the call.The HAL implementation must return OK if the plugin is created and ERROR_DRM_CANNOT_HANDLE if the plugin cannot be created.
cryptoPlugin
the created ICryptoPlugin