The php sdk is used. How can I encrypt videos with HLS? For more information, see hlsKey base64_urlsafe. What is hlsKeyUrl? How does PHP generate the hlsKeyType encrypted by rsa oa ep? Developer. qiniu. comdocs... the php sdk is used. How can I encrypt videos with HLS?
Refer to the following,hlsKey
It is base64_urlsafe. This is easy to understand,hlsKeyUrl
What is it? How does PHP generate an rsa oa ep encryption method?hlsKeyType
What about it?
Http://developer.qiniu.com/docs/v6/api/reference/fop/av/segtime.html
Hls Encryption
Hls encryption is to use the AES-128 bit to encrypt each ts file, the player in obtaining PlayList file, will according to the # EXT-X-KEY tag inside the request to obtain the decryption URL, and then request to decrypt the key, the obtained ts file will be decrypted with the key. Users can perform cookie verification on the URL of the key and other methods to authenticate the user. Example: PlayList file (copy the link to view the file content or play it directly with the vlc player)
Parameter description:
hlsKey
Base64_urlsafe encoding or encrypted key
hlsKeyUrl
Specifies the url of the key, which is base64_urlsafe encoded. This is used to generate m3u8 PlayList.
hlsKeyType
Specifies the method for transferring the key.
- If this parameter is not specified or 0 is specified, it is transmitted only in base64_urlsafe encoding mode.
- Specified as 1.x( 1.0, 1.1 ,...), The encryption method of rsa oa ep is used to transmit the key by encoding. x indicates the version of the key.
- Public Key: 1.0
Reply content:
The php sdk is used. How can I encrypt videos with HLS?
Refer to the following,hlsKey
It is base64_urlsafe. This is easy to understand,hlsKeyUrl
What is it? How does PHP generate an rsa oa ep encryption method?hlsKeyType
What about it?
Http://developer.qiniu.com/docs/v6/api/reference/fop/av/segtime.html
Hls Encryption
Hls encryption is to use the AES-128 bit to encrypt each ts file, the player in obtaining PlayList file, will according to the # EXT-X-KEY tag inside the request to obtain the decryption URL, and then request to decrypt the key, the obtained ts file will be decrypted with the key. Users can perform cookie verification on the URL of the key and other methods to authenticate the user. Example: PlayList file (copy the link to view the file content or play it directly with the vlc player)
Parameter description:
hlsKey
Base64_urlsafe encoding or encrypted key
hlsKeyUrl
Specifies the url of the key, which is base64_urlsafe encoded. This is used to generate m3u8 PlayList.
hlsKeyType
Specifies the method for transferring the key.
- If this parameter is not specified or 0 is specified, it is transmitted only in base64_urlsafe encoding mode.
- Specified as 1.x( 1.0, 1.1 ,...), The encryption method of rsa oa ep is used to transmit the key by encoding. x indicates the version of the key.
- Public Key: 1.0
Php call persistent processing (Audio and Video Processing) documentation can refer to the http://developer.qiniu.com/docs/v6/sdk/php-sdk.html#av-hls
To encrypt the slice, you only need to modify$fops
Value, suchavthumb/m3u8/segtime/10/hlsKey/ /hlsKeyType/ /hlsKeyUrl/
The plaintext is 16 bytes. Use the Public Key provided by qiniu and the following command to encrypt the plaintext:
$ echo -n [AES128KEY] | openssl rsautl -encrypt -oaep -inkey [QINIU_PUB_KEY_FILE] -pubin | openssl base64 -A | tr "+/" "-_"
If
The value is the base64 encoding of the plaintext key.
The value is 0. If
The value is the ciphertext encrypted by the qiniu public key.
The value can be 1.0 characters.
Fill in the plaintext address of the key, which is generally the address of your business server, and control the access permission to this url through the Business server process.