Wowza Community

Problem with token creation

I tried to create a token, so that it matches the token of server.

But i cant get the right Token for:

rtmp://192.168.1.79:1935/live/test?wowzatokenendtime=1600000000&wowzatokenCustomParameter=abcdef&wowzatokenhash=WRONG_TOKEN

I saw in the logs that the correct token will be

YQ-JU-z4mtKsx0OsxGB2dwvs1CDsDefkOcGdBO8hD4s=

My Method for tokengenerating:

public static string GenerateSHA256String(string inputString)
{
SHA256 sha256 = SHA256Managed.Create();
byte[] bytes = Encoding.UTF8.GetBytes(inputString);
byte[] hash = sha256.ComputeHash(bytes);
string token = Convert.ToBase64String(hash);
token = token.Replace(’+’, ‘-’);
token = token.Replace(’/’, ‘_’);
return token;
}

Shared Secret: abcdef

I hope i gave all needed information.

Best regards

Tobias

Thanks for your question, you can read here how to debug common token config issues. Scroll down to the “Troubleshooting” section.

https://www.wowza.com/docs/how-to-protect-streaming-using-securetoken-in-wowza-streaming-engine#troubleshooting

If this does not solve your issue, please submit a support ticket @Tobias Schneider and we will assist you.