Comparing version 0.9.1 to 1.0.0
@@ -5,2 +5,6 @@ # Change Log | ||
# [1.0.0](https://github.com/panva/paseto/compare/v0.9.1...v1.0.0) (2019-09-27) | ||
# 0.9.1 (2019-07-02) | ||
@@ -7,0 +11,0 @@ |
@@ -30,3 +30,3 @@ const { PasetoInvalid, PasetoNotSupported } = require('../errors') | ||
let result = { footer: footer ? decode(footer) : undefined, payload: undefined, version, purpose } | ||
const result = { footer: footer ? decode(footer) : undefined, payload: undefined, version, purpose } | ||
@@ -33,0 +33,0 @@ if (purpose === 'local') { |
@@ -106,3 +106,3 @@ const { parentPort, Worker, isMainThread } = require('worker_threads') | ||
'xchacha20-poly1305-encrypt' (cleartext, nonce, key, footer) { | ||
let n = sodium.crypto_generichash(24, cleartext, nonce) | ||
const n = sodium.crypto_generichash(24, cleartext, nonce) | ||
const preAuth = pae('v2.local.', n, footer) | ||
@@ -126,3 +126,3 @@ | ||
parentPort.on('message', function ({ id, method, args }) { | ||
let value = methods[method](...args) | ||
const value = methods[method](...args) | ||
parentPort.postMessage({ id, value }) | ||
@@ -129,0 +129,0 @@ }) |
@@ -12,3 +12,3 @@ const { PasetoNotSupported } = require('../errors') | ||
let buf = Buffer.allocUnsafe(8) | ||
const buf = Buffer.allocUnsafe(8) | ||
@@ -15,0 +15,0 @@ buf.writeUInt32LE(up, 4) |
@@ -38,6 +38,2 @@ /// <reference types="node" /> | ||
interface DecodeOptions<parse> { | ||
parse?: parse | ||
} | ||
interface DecodeResult { | ||
@@ -44,0 +40,0 @@ footer: Buffer | undefined, |
@@ -16,5 +16,6 @@ const crypto = require('crypto') | ||
return crypto.createSecretKey(await randomBytes(LOCAL_KEY_LENGTH)) | ||
case 'public': | ||
case 'public': { | ||
const { privateKey } = await generateKeyPair(...PUBLIC_KEY_ARGS) | ||
return privateKey | ||
} | ||
default: | ||
@@ -21,0 +22,0 @@ throw new PasetoNotSupported('unsupported v1 purpose') |
@@ -15,5 +15,6 @@ const crypto = require('crypto') | ||
return crypto.createSecretKey(await randomBytes(LOCAL_KEY_LENGTH)) | ||
case 'public': | ||
case 'public': { | ||
const { privateKey } = await generateKeyPair('ed25519') | ||
return privateKey | ||
} | ||
default: | ||
@@ -20,0 +21,0 @@ throw new PasetoNotSupported('unsupported v2 purpose') |
{ | ||
"name": "paseto", | ||
"version": "0.9.1", | ||
"version": "1.0.0", | ||
"description": "PASETO for Node.js with minimal dependencies", | ||
@@ -42,9 +42,9 @@ "keywords": [ | ||
"devDependencies": { | ||
"@commitlint/cli": "^8.0.0", | ||
"@commitlint/config-conventional": "^8.0.0", | ||
"ava": "^2.1.0", | ||
"babel-eslint": "^10.0.2", | ||
"c8": "^5.0.0", | ||
"husky": "^3.0.0", | ||
"standard": "^12.0.1" | ||
"@commitlint/cli": "^8.2.0", | ||
"@commitlint/config-conventional": "^8.2.0", | ||
"ava": "^2.4.0", | ||
"babel-eslint": "^10.0.3", | ||
"c8": "^5.0.4", | ||
"husky": "^3.0.5", | ||
"standard": "^14.3.1" | ||
}, | ||
@@ -62,4 +62,4 @@ "engines": { | ||
"dependencies": { | ||
"libsodium-wrappers": "^0.7.4" | ||
"libsodium-wrappers": "^0.7.5" | ||
} | ||
} |
# paseto | ||
[![build][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url] | ||
![build][actions-image] [![codecov][codecov-image]][codecov-url] | ||
> PASETO: <strong>P</strong>latform-<strong>A</strong>gnostic <strong>SE</strong>curity <strong>TO</strong>kens for Node.js with minimal dependencies | ||
> [PASETO](https://paseto.io): <strong>P</strong>latform-<strong>A</strong>gnostic <strong>SE</strong>curity <strong>TO</strong>kens for Node.js with minimal dependencies | ||
@@ -28,5 +28,3 @@ ## Implemented specs & features | ||
[<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160" align="right">][support-patreon] | ||
If you or your business use paseto, please consider becoming a [Patron][support-patreon] so I can continue maintaining it and adding new features carefree. You may also donate one-time via [PayPal][support-paypal]. | ||
[<img src="https://cdn.jsdelivr.net/gh/gregoiresgt/payment-icons@183140a5ff8f39b5a19d59ebeb2c77f03c3a24d3/Assets/Payment/PayPal/Paypal@2x.png" width="100" align="right">][support-paypal] | ||
If you or your business use paseto, please consider becoming a [sponsor][support-sponsor] so I can continue maintaining it and adding new features carefree. | ||
@@ -188,5 +186,3 @@ ## Documentation | ||
[suggest-feature]: https://github.com/panva/paseto/issues/new?labels=enhancement&template=feature-request.md&title=proposal%3A+ | ||
[support-patreon]: https://www.patreon.com/panva | ||
[support-paypal]: https://www.paypal.me/panva | ||
[travis-image]: https://api.travis-ci.com/panva/paseto.svg?branch=master | ||
[travis-url]: https://travis-ci.com/panva/paseto | ||
[support-sponsor]: https://github.com/users/panva/sponsorship | ||
[actions-image]: https://github.com/panva/paseto/workflows/Continuous%20Integration/badge.svg |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
41208
934
187
Updatedlibsodium-wrappers@^0.7.5