1.0.0-alpha.2 • Published 2 years ago

@mfellner/react-native-fast-create-hash v1.0.0-alpha.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-fast-create-hash

Build Status Codecov Version Downloads

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.