MediaDrmSignerpublic final class MediaDrmSigner extends Object Provides certificate request generation, response handling and
signing APIs |
Fields Summary |
---|
public static final int | CERTIFICATE_TYPE_X509Specify X.509 certificate type |
Constructors Summary |
---|
private MediaDrmSigner()
|
Methods Summary |
---|
public static com.android.mediadrm.signer.MediaDrmSigner$CertificateRequest | getCertificateRequest(android.media.MediaDrm drm, int certType, java.lang.String certAuthority)Generate a certificate request, specifying the certificate type
and authority. The response received should be passed to
provideCertificateResponse.
return new CertificateRequest(drm.getCertificateRequest(certType, certAuthority));
| public static com.android.mediadrm.signer.MediaDrmSigner$Certificate | provideCertificateResponse(android.media.MediaDrm drm, byte[] response)Process a response from the provisioning server. The response
is obtained from an HTTP Post to the url provided by getCertificateRequest.
The public X509 certificate chain and wrapped private key are returned
in the returned Certificate objec. The certificate chain is in BIO serialized
PEM format. The wrapped private key should be stored in application private
storage, and used when invoking the signRSA method.
return new Certificate(drm.provideCertificateResponse(response));
| public static byte[] | signRSA(android.media.MediaDrm drm, byte[] sessionId, java.lang.String algorithm, byte[] wrappedKey, byte[] message)Sign data using an RSA key
return drm.signRSA(sessionId, algorithm, wrappedKey, message);
|
|