craftzdog / react-native-quick-md5

Fast C++ implementation with JSI binding of MD5 for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-quick-md5

Blazingly fast C++ implementation with JSI binding of MD5 for React Native.

Confirmed that it's 10x faster than using spark-md5 on an iPhone 11 Pro and 8x faster on an Essential Phone. You can check out the benchmark tests under example.

Installation

npm install react-native-quick-md5

Usage

import { stringMd5 } from 'react-native-quick-md5';

const md5 = stringMd5('hoge');
// => "ea703e7aa1efda0064eaa507d9e8ab7e"

stringMd5(data: string): string

Calculate MD5 for given UTF-8 string data. Returns hex encoded hash.

binaryMd5(data: string | ArrayBuffer): string

Calculate MD5 for given binary string or ArrayBuffer data. Returns hex encoded hash.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

See also

About

Fast C++ implementation with JSI binding of MD5 for React Native

License:MIT License


Languages

Language:C++ 43.5%Language:Java 22.3%Language:TypeScript 12.0%Language:Objective-C 9.7%Language:Ruby 4.1%Language:JavaScript 3.9%Language:CMake 1.7%Language:Objective-C++ 1.7%Language:C 0.6%Language:Shell 0.2%Language:Swift 0.2%