An open API service indexing awesome lists of open source software.

https://github.com/topgunbuild/webcrypto

An isomorphic WebCrypto object for Javascript in Node and the browser
https://github.com/topgunbuild/webcrypto

aes crypto isomorphic javascript pbkdf2 rsa typescript webcrypto

Last synced: 7 months ago
JSON representation

An isomorphic WebCrypto object for Javascript in Node and the browser

Awesome Lists containing this project

README

          

🔑 @topgunbuild/webcrypto


An isomorphic WebCrypto for Javascript in Node and the browser, used in TopGun



npm


bundlephobia


License: MIT

## What?

It is an isomorphic WebCrypto object that combines [a great Node polyfill](https://github.com/PeculiarVentures/webcrypto) and [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API).

## Install

```bash
npm install @topgunbuild/webcrypto
```

## Usage

There's a simple hashing example below, but [there are many more WebCrypto examples here](https://github.com/diafygi/webcrypto-examples).

```javascript
const crypto = require('@topgunbuild/webcrypto')
// or
import crypto from '@topgunbuild/webcrypto';

crypto.randomUUID (); // => '43e16416-7a2a-4c00-b2e8-1ea7a57adfb9'
```

## License

MIT