react-native-md-hash
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

React Native MD5 Hash

MD5 Hash native module for react-native

Installation

npm install --save react-native-md-hash

or

yarn add react-native-md-hash

Installation (iOS)

Using CocoaPods (React Native 0.60 and higher)
cd ios
pod install

Installation (Android)

React Native 0.60 and higher
  • Linking automatically

Usage

Example

import { NativeModules, Platform } from 'react-native'
var MD = NativeModules.Md
 

MD5

  private md5 () {
    const plain_string:string = "1234567890";
    console.log ("[iOS] plaing string : " + plain_string);
 
    try {
      MD.md5(plain_string).then((hash: any) => {
        console.log ("[iOS] MD5 hash : " + hash);
      })
    } catch (e) {
        console.error(e)
    }  
  }

iOS Test

[Fri Aug 21 2020 15:48:31.205]  LOG      [iOS] plaing string : 1234567890
[Fri Aug 21 2020 15:48:31.206]  LOG      [iOS] MD5 hash : e807f1fcf82d132f9bb018ca6738a19f

Android Test

[Fri Aug 21 2020 15:57:35.833]  LOG      [Android] plaing string : 1234567890
[Fri Aug 21 2020 15:57:35.873]  LOG      [Android] MD5 hash : e807f1fcf82d132f9bb018ca6738a19f

Package Sidebar

Install

npm i react-native-md-hash

Weekly Downloads

9

Version

1.0.3

License

MIT

Unpacked Size

89.2 kB

Total Files

25

Last publish

Collaborators

  • taeheunlee