yaml-crypt
Advanced tools
Comparing version 0.7.6 to 0.7.7
@@ -179,3 +179,4 @@ const crypto = require("crypto"); | ||
function brancaEncrypt(key, msg) { | ||
return branca(key).encode(msg, __brancaDefaults.ts, __brancaDefaults.nonce); | ||
const bytes = Buffer.from(key); | ||
return branca(bytes).encode(msg, __brancaDefaults.ts, __brancaDefaults.nonce); | ||
} | ||
@@ -190,3 +191,4 @@ | ||
function brancaDecrypt(key, msg) { | ||
const payload = branca(key).decode(msg); | ||
const bytes = Buffer.from(key); | ||
const payload = branca(bytes).decode(msg); | ||
return payload.toString(); | ||
@@ -193,0 +195,0 @@ } |
{ | ||
"name": "yaml-crypt", | ||
"version": "0.7.6", | ||
"version": "0.7.7", | ||
"description": "Encrypt and decrypt YAML documents", | ||
@@ -20,11 +20,10 @@ "license": "MIT", | ||
"test": "nyc mocha --timeout=8000 --check-leaks", | ||
"test:coverage": "npx nyc --reporter=lcov mocha", | ||
"build": "yarn lint && yarn test", | ||
"prepublish": "yarn build", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls" | ||
"test:coverage": "nyc --reporter=lcov mocha", | ||
"build": "yarn lint && yarn test:coverage", | ||
"prepublish": "yarn build" | ||
}, | ||
"dependencies": { | ||
"argparse": "^2.0.1", | ||
"branca": "^0.3.0", | ||
"fernet": "^0.3.1", | ||
"branca": "^0.5.0", | ||
"fernet": "^0.4.0", | ||
"js-yaml": "^4.1.0", | ||
@@ -36,8 +35,8 @@ "pkginfo": "^0.4.1", | ||
"devDependencies": { | ||
"chai": "^4.3.4", | ||
"coveralls": "^3.1.0", | ||
"eslint": "^7.26.0", | ||
"mocha": "^8.4.0", | ||
"chai": "^4.3.7", | ||
"coveralls": "^3.1.1", | ||
"eslint": "^8.36.0", | ||
"mocha": "^10.2.0", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.3.0" | ||
"prettier": "^2.8.4" | ||
}, | ||
@@ -44,0 +43,0 @@ "prettier": { |
@@ -21,5 +21,5 @@ const fernet = require("fernet"); | ||
function decryptBranca(key, msg) { | ||
return branca(key).decode(msg).toString(); | ||
return branca(Buffer.from(key)).decode(msg).toString(); | ||
} | ||
module.exports = { setupCrypto, decryptBranca }; |
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
2269
80600
26
+ Addedbase-x@4.0.0(transitive)
+ Addedbranca@0.5.0(transitive)
+ Addedcrypto-js@3.1.8(transitive)
+ Addedfernet@0.4.0(transitive)
- Removedbase-x@3.0.10(transitive)
- Removedbranca@0.3.0(transitive)
- Removedcrypto-js@4.2.0(transitive)
- Removedfernet@0.3.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
Updatedbranca@^0.5.0
Updatedfernet@^0.4.0