Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1020 Bytes

readme.md

File metadata and controls

51 lines (38 loc) · 1020 Bytes

🤫 subtle-rsa

Simple wrapper around
SubtleCrypto RSA implementation.



import SubtleRSA from 'subtle-rsa'

let rsa = new SubtleRSA()

let encryptedValue = await rsa.encrypt('value')

if ('value' === (await rsa.decrypt(encryptedValue))) {
  // success!
}

Installation

Install with npm:

npm install --save subtle-rsa

Or yarn:

yarn add subtle-rsa

Or using a script tag:

<script
  src="https://unpkg.com/subtle-rsa@^0.1/lib/index.umd.js"
  crossorigin="anonymous"
></script>