Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rahulgsa
Visitor

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