react-native-pinning-sha256
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

react-native-pinning-sha256

A react-native library for pinning SSL using SHA-256 public key.

Getting started

$ yarn add react-native-pinning-ssl

Get SHA-256 key

Usage

import { isSSLValid } from "react-native-pinning-sha256";

async function runSSLPinning() {
  try {
    const result = await isSSLValid({
      url: "https://github.com/",
      hashes: ["CA 06 F5 6B 25 8B 7A 0D 4F 2B 05 47 09 39 47 86 51 15 19 84"],
      domainNames: ["github.com"],
    });

    return result;
  } catch (e) {
    console.log(e);
  }
}

runSSLPinning();

References

NSURLAuthenticationChallenge+Fingerprint credited to https://stackoverflow.com/a/26963381

Readme

Keywords

Package Sidebar

Install

npm i react-native-pinning-sha256

Weekly Downloads

0

Version

1.1.2

License

MIT

Unpacked Size

1.37 MB

Total Files

87

Last publish

Collaborators

  • movibe