# react-native-cross-pki

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

Latest version **0.4.3-beta02** (published 2023-02-02) · Commercial license · 0 weekly downloads

## Install

```sh
npm install react-native-cross-pki
pnpm add react-native-cross-pki
yarn add react-native-cross-pki
bun add react-native-cross-pki
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.3-beta02 |
| Published | 2023-02-02 |
| First published | 2022-01-10 |
| Weekly downloads | 0 |
| License | Commercial |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 267.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lacuna Software |
| Maintainers | lacuna-dev |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-cross-pki
- Repository: https://lacunasoftware.com
- npm.io page: https://npm.io/package/react-native-cross-pki

## Dependencies (1)

- [node-forge](https://npm.io/package/node-forge.md) ^1.2.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.4.3-beta02 (latest) — 2023-02-02
- 0.4.3-beta01 — 2023-02-01
- 0.4.2 — 2022-12-16
- 0.4.1 — 2022-12-10
- 0.4.0-beta02 — 2022-12-08
- 0.4.0-beta01 — 2022-12-01
- 0.3.0 — 2022-02-27
- 0.2.0-beta.1 — 2022-02-23
- 0.1.0-beta.2 — 2022-01-10
- 0.1.0-beta.1 — 2022-01-10

## README

# react-native-cross-pki

React Native module for handling X509 certificates and key pairs from native platform key stores.

## Installation

```sh
npm install react-native-cross-pki
```

## Usage

```js
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

---
_Source: https://npm.io/package/react-native-cross-pki · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
