How to hash the correct url to playback the vod MPEG-DASH file?

I install a wowza server on server A, and I can playback the vod video on computer B.

But after I set the Outgoing Security.

I can’t playback any more, I have already read and try this article (https://www.wowza.com/docs/how-to-protect-streaming-using-securetoken-in-wowza-streaming-engine).

But it’s not working.

my setting:

SecureToken

Protect all protocols using hash (SecureToken version 2)

Shared Secret

adcd

Hash Algorithm

SHA-256

Use TEA for RTMP token security: false

Include client IP address in hash generation: false

Hash Query Parameter Prefix

wowzatoken

Client Restrictions

Not enabled

Place give me some help. Thanks!

I’m so junior.

Is there anyone can help me?

There are numerous examples on the Net about how to hash a string with SHA256 in C#. You can eg. try this code (not tested though)

var password    = "123456";
var application = "live";
var streamname  = "myStream";
var text        = application + "/" + streamname + "?" + password;
var bytes       = System.Text.Encoding.UTF8.GetBytes(text);
var sha256      = new System.Security.Cryptography.SHA256Managed();
var hash        = sha256.ComputeHash(bytes);
var token       = Convert.ToBase64String(hash);
token = token.Replace('+', '-');
token = token.Replace('/', '_');
var url = "http://server:1935/" + application + "/" + streamname + "?wowzatokenhash=" + token;