I am attempting to implement PBKDF2 (Password-Based Key Derivation Function 2) in britescript. I managed to implement a dynamic hashing function using roHMAC and roByteArray. The two steps I'm having trouble with are converting an ascii string to binary (and back) and also a bit-wise XOR function.
I can't tell if there's a subtle bug in britescript or not but after adding the extra bytes to the end of the salt the ascii-based SHA256 hashing was producing incorrect values. When I switched to hexString-based hashing everything started to work though.
The other downside is that the recommended 4096 loops of hashing takes multiple minutes to complete on the roku box. I don't think it'll actually be usable in this case. Bummer.