react-native-cross-pki
TypeScript icon, indicating that this package has built-in type declarations

0.4.3-beta02 • Public • Published

react-native-cross-pki

React Native module for handling X509 certificates and key pairs from native platform key stores.

Installation

npm install react-native-cross-pki

Usage

import { CrossPki, DigestAlgorithm } from 'react-native-cross-pki';

// ...

const toSignData = 'SGVsbG8sIFdvcmxkIQ==';
const toSignHash = '3/1gIbsr1bCvZ2KQgJ7DpTGR3YHH9wpLKGiKNiGCmG8=';

// list certificates with associated private key
let certificates = await CrossPki.listCertificatesWithKey();

// select a certificate
let cert = certificates[0];

// get select certificate content (X509 Certificate DER encoded bytes in Base64)
let content = cert.encoded;

// sign data with selected certificate
let signature = await CrossPki.signData(cert.thumbprint, DigestAlgorithm.sha256, toSignData);

// sign hash with selected certificate
let hashSignature = await CrossPki.signHash(cert.thumbprint, DigestAlgorithm.sha256, toSignHash);

License

PROPRIETARY COMMERCIAL LICENSE

This is proprietary software/module part of Lacuna Software PkiSuite. For licensing please visit https://lacunasoftware.com

Package Sidebar

Install

npm i react-native-cross-pki

Weekly Downloads

2

Version

0.4.3-beta02

License

Commercial

Unpacked Size

274 kB

Total Files

49

Last publish

Collaborators

  • lacuna-dev