Encryption - Decryption in BrightScript / Roku

parrypatel021

Parry Patel

Posted on March 8, 2022

Encryption - Decryption in BrightScript / Roku

In this article, we will see how can perform Encrypt and Decrypt a string using the ToBase64String() and ToAsciiString() functions available in BrightScript respectively.

Encryption

ba = CreateObject("roByteArray")
ba.FromAsciiString("123456")
encryptedString = ba.ToBase64String()
Enter fullscreen mode Exit fullscreen mode

Decryption

ba = CreateObject("roByteArray")
ba.FromBase64String(encryptedString)
encryptedString = ba.ToAsciiString()
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
parrypatel021
Parry Patel

Posted on March 8, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related