# How to secure Apple-HLS  external method via Nodejs server-side ?

**URL:** <https://community.wowza.com/t/how-to-secure-apple-hls-external-method-via-nodejs-server-side/48642>\
**Category:** Wowza Streaming Engine\
**Created:** [May 8, 2017, 11:36pm UTC](https://community.wowza.com/t/how-to-secure-apple-hls-external-method-via-nodejs-server-side/48642 "2017-05-08T23:36:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![voratham\_siriapiwatt](https://avatars.discourse-cdn.com/v4/letter/v/8dc957/32.png) [@voratham\_siriapiwatt](https://community.wowza.com/u/voratham_siriapiwatt)\
**Post date:** [May 8, 2017, 11:36pm UTC](https://community.wowza.com/t/how-to-secure-apple-hls-external-method-via-nodejs-server-side/48642/1 "2017-05-08T23:36:46Z")

</div>

Hello , I am newbie for wowza engine. I have config secure apple http aes-128 because I have channel for private that get via key

OK ,It’s working good for server-side of php

[https://www.wowza.com/docs/how-to-secure-apple-http-live-streaming-aes-128-external-method](https://www.wowza.com/docs/how-to-secure-apple-http-live-streaming-aes-128-external-method)

But i would like to working on nodejs server-side , I tried that’s duplicate from php script convert to nodejs script then I found it’s can working but can’t streaming video because get key from response server-side the wrong key. But It’s still download file.ts continue right.

I think key get from server-side correct , But key that get from server-side was change , I don’t know it to change from where ?

**Example get key from server-side of nodejs**

```auto
v¶Ö¬#D¬Ë_vOC after send to client side :: vÂ¶ÃÂ¬#DÂ¬Ã_vOCÂ

```

nodejs package of code , I use [http://locutus.io/php/strings/hex2bin/](http://locutus.io/php/strings/hex2bin/) for hex2bin function on my nodejs

Sorry for My English is terrible.
