SPEKEAPIv1-即時工作流程方法呼叫範例 - 安全封裝器和編碼器金鑰交換API規格

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

SPEKEAPIv1-即時工作流程方法呼叫範例

請求語法範例

以下URL是一個示例,並不表示固定格式:

POST https://speke-compatible-server/speke/v1.0/copyProtection

請求內文

元CPIX素。

請求標頭

名稱 Type 發生 描述

AWS Authorization

字串

1..1

請參閱第AWS四章

X-Amz-Security-Token

字串

1..1

請參閱第AWS四章

X-Amz-Date

字串

1..1

請參閱第AWS四章

Content-Type

字串

1..1

application/xml

回應標頭

名稱 Type 發生 描述

Speke-User-Agent

字串

1..1

識別金鑰提供者的字串

Content-Type

字串

1..1

application/xml

請求回應

HTTP CODE 承載名稱 發生 描述

200 (Success)

CPIX

1..1

DASH-CPIX 有效負載響應

4XX (Client error)

用戶端錯誤訊息

1..1

用戶端錯誤描述

5XX (Server error)

伺服器錯誤訊息

1..1

伺服器錯誤描述

注意

本節中的範例不包含內容金鑰加密。如需如何新增內容金鑰加密的詳細資訊,請參閱內容金鑰加密

清除中包含金鑰的即時範例請求承載

下列範例顯示從加密程式傳送至DRM金鑰提供者的典型即時要求承載:

<cpix:CPIX id="abc123" xmlns:cpix="urn:dashif:org:cpix" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc" xmlns:speke="urn:aws:amazon:com:speke"> <cpix:ContentKeyList> <cpix:ContentKey kid="98ee5596-cd3e-a20d-163a-e382420c6eff" explicitIV="OFj2IjCsPJFfMAxmQxLGPw=="></cpix:ContentKey> </cpix:ContentKeyList> <cpix:DRMSystemList> <!-- HLS AES-128 (systemId is implementation specific)--> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="81376844-f976-481e-a84e-cc25d39b0b33"> <cpix:URIExtXKey></cpix:URIExtXKey> <speke:KeyFormat></speke:KeyFormat> <speke:KeyFormatVersions></speke:KeyFormatVersions> </cpix:DRMSystem> <!-- HLS SAMPLE-AES --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"> <cpix:URIExtXKey></cpix:URIExtXKey> <speke:KeyFormat></speke:KeyFormat> <speke:KeyFormatVersions></speke:KeyFormatVersions> </cpix:DRMSystem> <!-- Common encryption (Widevine)--> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cpix:PSSH></cpix:PSSH> </cpix:DRMSystem> <!-- Common encryption / MSS (Playready) --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="9a04f079-9840-4286-ab92-e65be0885f95"> <speke:ProtectionHeader></speke:ProtectionHeader> <cpix:PSSH></cpix:PSSH> </cpix:DRMSystem> </cpix:DRMSystemList> <cpix:ContentKeyPeriodList> <cpix:ContentKeyPeriod id="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f" index="1" /> </cpix:ContentKeyPeriodList> <cpix:ContentKeyUsageRuleList> <cpix:ContentKeyUsageRule kid="98ee5596-cd3e-a20d-163a-e382420c6eff"> <cpix:KeyPeriodFilter periodId="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f" /> </cpix:ContentKeyUsageRule> </cpix:ContentKeyUsageRuleList> </cpix:CPIX>

清除中包含金鑰的即時範例請求承載

下列範例顯示DRM金鑰提供者的典型回應承載:

<cpix:CPIX xmlns:cpix="urn:dashif:org:cpix" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc" xmlns:speke="urn:aws:amazon:com:speke" id="abc123"> <cpix:ContentKeyList> <cpix:ContentKey explicitIV="OFj2IjCsPJFfMAxmQxLGPw==" kid="98ee5596-cd3e-a20d-163a-e382420c6eff"> <cpix:Data> <pskc:Secret> <pskc:PlainValue>5dGAgwGuUYu4dHeHtNlxJw==</pskc:PlainValue> </pskc:Secret> </cpix:Data> </cpix:ContentKey> </cpix:ContentKeyList> <cpix:DRMSystemList> <!-- HLS AES-128 (systemId is implementation specific) --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="81376844-f976-481e-a84e-cc25d39b0b33"> <cpix:URIExtXKey>aHR0cHM6Ly83azR5dHV4cTVkLmV4ZWN1dGUtYXBpLnVzLXdlc3QtMi5hbWF6b25hd3MuY29tL0VrZVN0YWdlL2NsaWVudC9hYmMxMjMvOThlZTU1OTYtY2QzZS1hMjBkLTE2M2EtZTM4MjQyMGM2ZWZm</cpix:URIExtXKey> <speke:KeyFormat>aWRlbnRpdHk=</speke:KeyFormat> <speke:KeyFormatVersions>MQ==</speke:KeyFormatVersions> </cpix:DRMSystem> <!-- HLS SAMPLE-AES --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"> <cpix:URIExtXKey>aHR0cHM6Ly83azR5dHV4cTVkLmV4ZWN1dGUtYXBpLnVzLXdlc3QtMi5hbWF6b25hd3MuY29tL0VrZVN0YWdlL2NsaWVudC9hYmMxMjMvOThlZTU1OTYtY2QzZS1hMjBkLTE2M2EtZTM4MjQyMGM2ZWZm</cpix:URIExtXKey> <speke:KeyFormat>Y29tLmFwcGxlLnN0cmVhbWluZ2tleWRlbGl2ZXJ5</speke:KeyFormat> <speke:KeyFormatVersions>MQ==</speke:KeyFormatVersions> </cpix:DRMSystem> <!-- Common encryption (Widevine) --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cpix:PSSH>AAAAanBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEoIARIQeSIcblaNbb7Dji6sAtKZzRoNd2lkZXZpbmVfdGVzdCIfa2V5LWlkOmVTSWNibGFOYmI3RGppNnNBdEtaelE9PSoCU0QyAA==</cpix:PSSH> </cpix:DRMSystem> <!-- Common encryption / MSS (Playready) --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="9a04f079-9840-4286-ab92-e65be0885f95"> <speke:ProtectionHeader>CgMAAAEAAQAAAzwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4ATwBXAGoAaAB0AHIAMwB1ADkAawArAHIAZABvADEASQBMAFkAMAByAGEAdwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgBCADMAQQA2AEEAMwB4AG0AdABkAEkAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAOgAvAC8AcABsAGEAeQByAGUAYQBkAHkALgBkAGkAcgBlAGMAdAB0AGEAcABzAC4AbgBlAHQALwBwAHIALwBzAHYAYwAvAHIAaQBnAGgAdABzAG0AYQBuAGEAZwBlAHIALgBhAHMAbQB4AD8AUABsAGEAeQBSAGkAZwBoAHQAPQAxACYAYQBtAHAAOwBhAG0AcAA7AGEAbQBwADsAVQBzAGUAUwBpAG0AcABsAGUATgBvAG4AUABlAHIAcwBpAHMAdABlAG4AdABMAGkAYwBlAG4AcwBlAD0AMQA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAU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QBBAEQARQBSAD4A</cpix:PSSH> </cpix:DRMSystem> </cpix:DRMSystemList> <cpix:ContentKeyPeriodList> <cpix:ContentKeyPeriod id="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f" index="1" /> </cpix:ContentKeyPeriodList> <cpix:ContentKeyUsageRuleList> <cpix:ContentKeyUsageRule kid="98ee5596-cd3e-a20d-163a-e382420c6eff"> <cpix:KeyPeriodFilter periodId="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f" /> </cpix:ContentKeyUsageRule> </cpix:ContentKeyUsageRuleList> </cpix:CPIX>