If anyone still looking same issue on 2024 and using Expo, you can just try Expo Crypto: https://docs.expo.dev/versions/latest/sdk/crypto/
const sha256Text = await Crypto.digestStringAsync( Crypto.CryptoDigestAlgorithm.SHA256, 'Example text');