0.6.5 • Published 6 years ago

crypto-api-wrapper v0.6.5

Weekly downloads
4
License
Apache 2
Repository
github
Last release
6 years ago

Crypto API wrapper

This lib is a wrapper around the Web Crypto API, it offers an API with sane defaults. The documentation can be found here.

Installation

npm i crypto-api-wrapper

Usage

This lib exports 2 objects : asymmetricCrypto and symmetricCrypto

asymmetricCrypto API

  • generateSigningKey()
  • generateEncryptionKey()
  • exportKey(keypair)
  • importKey(keydata)
  • sign(plaintext, privateKey)
  • verify(plaintext, signature, publicKey)
  • encrypt(plaintext, publicKey)
  • decrypt(ciphertext, privateKey)

symmetricCrypto API

  • generateEncryptionKey()
  • exportKey(encryptionKey)
  • toB64(keydata)
  • fromB64(keydataB64)
  • importKey(keydata)
  • encrypt(plaintext, encryptionKey)
  • decrypt(ciphertext, encryptionKey)

Contributing

Install dependencies

npm i
npm i --no-save node-webcrypto-ossl

Run the tests

Run the test in a browser :

npm run test

Run the test with NodeJS :

npm run test-node

Generate the documentation

npm run doc
0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.1-beta

6 years ago

0.4.0-beta

6 years ago

0.3.0-beta-1

6 years ago

0.2.2-beta-1

6 years ago

0.2.1-beta-1

6 years ago

0.2.0-beta-1

6 years ago

0.1.0-beta-2

6 years ago

0.1.0-beta-1

6 years ago