This doesn’t work at all. The variable ‘hash’ is returned as a hex-encoded string. That messes everything up. I've also tried to base64 encode ba1 after the digest.update(ba1) call, but it appears that ba1 is still the same (untransformed by the sha256 encoding). What I really want out of the digest variable is a transformed roByteArray that I can then call .ToBase64String() on.