pub enum Method {
None,
Aes128,
SampleAes,
SampleAesCtr,
}Expand description
Corresponds to the #EXT-X-KEY:METHOD attribute.
See Key for a link to the HLS documentation for this attribute.
Variants§
None
Media Segments are not encrypted.
Aes128
Media Segments are completely encrypted using the Advanced Encryption Standard (AES) with a 128-bit key, Cipher Block Chaining (CBC), and Public-Key Cryptography Standards #7 (PKCS7) padding [RFC5652]. CBC is restarted on each segment boundary, using either the Initialization Vector (IV) attribute value or the Media Sequence Number as the IV.
SampleAes
the Media Segments are Sample Encrypted using the Advanced Encryption Standard. How these media streams are encrypted and encapsulated in a segment depends on the media encoding and the media format of the segment. fMP4 Media Segments are encrypted using the ‘cbcs’ scheme of Common Encryption. Encryption of other Media Segment formats containing H.264, AAC, AC-3, and Enhanced AC-3 media streams is described in the HTTP Live Streaming (HLS) Sample Encryption specification.
SampleAesCtr
An encryption method of SAMPLE-AES-CTR is similar to SAMPLE-AES. However, fMP4 Media Segments are encrypted using the ‘cenc’ scheme of Common Encryption. Encryption of other Media Segment formats is not defined for SAMPLE-AES-CTR.