react-native-fast-create-hash
Fast, native createHash implementation for React Native.
Installation
yarn add @mfellner/react-native-fast-create-hash
Usage
import { createHash } from '@mfellner/react-native-fast-create-hash';
import { Buffer } from 'buffer';
const buffer: Buffer = await createHash(Buffer.from('hello'), 'sha256');
createHash(data: Uint8Array, algorithm: Algorithm): Promise<Buffer>
data
– Raw input bytes to be hashed.algorithm
– Name of a supported SHA algorithm.- Returns: Raw bytes of the hash digest.
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.