wormhole-crypto
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,2 +0,2 @@ | ||
export { Keychain } from './lib/keychain.js' | ||
export { Keychain, plaintextSize, encryptedSize } from './lib/keychain.js' | ||
export { transformStream } from './lib/transform-stream.js' |
{ | ||
"name": "wormhole-crypto", | ||
"description": "Streaming encryption for Wormhole.app, based on Encrypted Content-Encoding for HTTP (RFC 8188)", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": { | ||
@@ -44,3 +44,3 @@ "name": "Socket Inc", | ||
"scripts": { | ||
"test": "standard && npm run test-browser", | ||
"test": "standard", | ||
"test-browser": "airtap --concurrency 1 -- test/*.js", | ||
@@ -47,0 +47,0 @@ "test-browser-local": "airtap --preset local -- test/*.js" |
@@ -50,4 +50,8 @@ # wormhole-crypto [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] | ||
### `keychain = new Keychain([key, [salt]])` | ||
### `new Keychain([key, [salt]])` | ||
Type: `Class` | ||
Returns: `Keychain` | ||
Create a new keychain object. The keychain can be used to create encryption streams, decryption streams, and to encrypt or decrypt a "metadata" buffer. | ||
@@ -162,3 +166,3 @@ | ||
### `encryptStream(stream)` | ||
### `keychain.encryptStream(stream)` | ||
@@ -179,3 +183,3 @@ Type: `Function` | ||
### `decryptStream(encryptedStream)` | ||
### `keychain.decryptStream(encryptedStream)` | ||
@@ -195,3 +199,3 @@ Type: `Function` | ||
### `encryptMeta(meta)` | ||
### `keychain.encryptMeta(meta)` | ||
@@ -218,3 +222,3 @@ Type: `Function` | ||
### `decryptMeta(encryptedMeta)` | ||
### `keychain.decryptMeta(encryptedMeta)` | ||
@@ -233,4 +237,20 @@ Type: `Function` | ||
### `plaintextSize(encryptedSize)` | ||
Type: 'Function` | ||
Returns: `Number` | ||
Given an encrypted size, return the corresponding plaintext size. | ||
### `encryptedSize(plaintextSize)` | ||
Type: 'Function` | ||
Returns: `Number` | ||
Given a plaintext size, return the corresponding encrypted size. | ||
## License | ||
MIT. Copyright (c) [Socket Inc](https://socket.dev) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26430
251