Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
rahulgsa
Level 7

EVPCipher decryption issue

Hi, I have written EVPCipher bf-cbc encryption and decryption code in Bright Script, which is working fine. But when i try to decrypt that encrypted payload at server side which is written in Rubi / Rails, throws error (bad encryption), while same code is working fine in decrypting other platform encrypted payload like Apple and Android. Please suggest me is there any special effort require to decrypt, bright script encoded payload.

Bright script encryption code
Function crypto_encrypt(encryptKey As String, IV As String, text As String) As String

   crypto = CreateObject("roEVPCipher")
   crypto.Setup(true, "bf",encryptKey,IV,1)
   ba = CreateObject("roByteArray")
   ba.FromAsciiString(text)
    result = crypto.Process(ba)
    print "result >>>> "result
   return lcase(result.ToHexString())
   
End function
0 Kudos