Please provide the following:
- SDK Version:v39.0.0.
- Platforms(Android/iOS/web/all): all
Expo now provides a hashing method but only accepts String types for input.
Nodejs provides hashing of
buffers/strings/arrays and can
return the hashed value as a buffer as well .
The issue I am having is that I need to hash a buffer(
uint8array ) in my app with sha256 . So I must find a way to convert it to a string, this causes issues because if I convert the buffer to anything else ex.(
hexString,base64 ) my hash result is not equivalent to the exact value that nodejs crypto would provide.
have also tried converting the buffer to
utf-8/16 strings but this causes issues because the
chars in this format can have multiple bytes( issues with the number being above 127 ). So this path was incorrect as well.
My hashes must be equivalent to the traditional nodejs
I am hitting a wall on this issue and not not find a way around it.
Any way to handle it ?