Skip to content

reactspring/react-native-md-hash

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published