How to Hash Buffer with Expo for an array [Reopen]

Reopening - previous
How to Hash Buffer with Expo for an array?
Expo-crypto only supports string inputs, prevents chained hasing or evening signing binaries.

Please provide the following:

  1. SDK Version: 45
  2. Platforms(Android/iOS/web/all): all
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

React-native solution for:

export async function sha256(data) {
const hash = crypto.createHash(‘sha256’);
hash.update(data); // data here is a Uint8Array !
const digest = hash.digest();
}

Previously was using isomorphic-webcrypto but that no longer works.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.