Discussions

Is your Roku TV not working? Join our online community forum to find help with common Roku TV issues, get troubleshooting tips, and share your experiences.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sagarHexa
Newbie

Cipher (aes-256) Encryption not working and always return invalid result.

iv = ""
padding = 1
cipher = CreateObject("roEVPCipher")
cipher.setup(true, "aes-256-cbc", args.key, iv, padding)
data = FormatJson(args.data)
ba = CreateObject("roByteArray")
ba.FromAsciiString(data)
result = cipher.process(ba)

Here secret key I am using is 32 bytes (
39665e28ee8y7rc6b25c57068f2f04c3)


iv is optional here, but I have tried with 32 byte hex string as well.

It always return invalid result, anyone have idea why it fails?

Labels (1)
0 Kudos
1 REPLY 1
renojim
Community Streaming Expert

Re: Cipher (aes-256) Encryption not working and always return invalid result.

@sagarHexa, I tried to get this moved to the developer section where it belongs, but, as usual, the moderators are ignoring my report.

You don't have enough hex bytes in your key.  A "hex byte" is two characters from 00 to FF.  You need 32 of them (or 64 characters total) and I don't know what it does with letters like the y you have in your key.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos