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()
Decryption
ba = CreateObject("roByteArray")
ba.FromBase64String(encryptedString)
encryptedString = ba.ToAsciiString()
Top comments (0)