# On which players will HLS encryption work?

**URL:** <https://community.wowza.com/t/on-which-players-will-hls-encryption-work/93670>\
**Category:** Wowza Streaming Engine\
**Tags:** wowza-streaming-server-java-api\
**Created:** [August 9, 2021, 12:58pm UTC](https://community.wowza.com/t/on-which-players-will-hls-encryption-work/93670 "2021-08-09T12:58:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julia\_Karwat](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Julia\_Karwat](https://community.wowza.com/u/Julia_Karwat)\
**Post date:** [August 9, 2021, 12:58pm UTC](https://community.wowza.com/t/on-which-players-will-hls-encryption-work/93670/1 "2021-08-09T12:58:36Z")

</div>

I am trying to encrypt live with the methods given in the documentation:

This is my method in module

**public**  **void** onHTTPCupertinoEncryptionKeyLiveChunk(ILiveStreamPacketizer liveStreamPacketizer, String streamName,

CupertinoEncInfo encInfo, **long** chunkId, **int** mode) {

**if** (streamName.startsWith(“aes128”)) {

encInfo.setEncMethod(CupertinoEncInfo. _ **METHOD\_AES\_128** _ );

encInfo.setEncUrl(“[http://mycompanykeyserver.com/authenticate.aspx](http://mycompanykeyserver.com/authenticate.aspx)”);

encInfo.setEncKeyBytes(BufferUtils. _decodeHexString_ (“123456789ABCDEF123456789ABCDEF12”));

encInfo.setEncIVBytes(BufferUtils. _decodeHexString_ (“FEDCBA9876543210FEDCBA9876543210”));

encInfo.setEncKeyFormatVersion(“1”);

_getLogger_ ().info(“FairPlay encryption”);

}

**if** (streamName.startsWith(“aes”)) {

encInfo.setEncMethod(CupertinoEncInfo. _ **METHOD\_SAMPLE\_AES** _ );

encInfo.setEncUrl(“[http://mycompanykeyserver.com/authenticate.aspx](http://mycompanykeyserver.com/authenticate.aspx)”);

encInfo.setEncKeyBytes(BufferUtils. _decodeHexString_ (“123456789ABCDEF123456789ABCDEF12”));

encInfo.setEncIVBytes(BufferUtils. _decodeHexString_ (“FEDCBA9876543210FEDCBA9876543210”));

encInfo.setEncKeyFormat(CupertinoEncInfo. _ **APPLE\_KEYFORMAT\_IDENTITY** _ );

encInfo.setEncKeyFormatVersion(“1”);

_getLogger_ ().info(“FairPlay encryption”);

}

}

I can’t play my encrypted live anywhere when I give the license server URL, the license is definitely good because it is for fairplay but it doesn’t work in any player. My question is how can I check if my encryption with given key will work? I want to play my stream after entering my license. what free players are recommended?

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [August 10, 2021, 6:06pm UTC](https://community.wowza.com/t/on-which-players-will-hls-encryption-work/93670/2 "2021-08-10T18:06:15Z")

</div>

We typically use VLC player to test for encryption and we used that recently in a webinar to show that the encryption was working. The test is that your stream will not play with encryption and you get a black screen and error and without the encryption it will play no problem.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [August 10, 2021, 6:06pm UTC](https://community.wowza.com/t/on-which-players-will-hls-encryption-work/93670/3 "2021-08-10T18:06:46Z")

</div>

It’s a free player to download by the way.

[https://www.videolan.org/index.wa.html](https://www.videolan.org/index.wa.html)
