Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yaml-crypt

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml-crypt - npm Package Compare versions

Comparing version 0.7.6 to 0.7.7

6

lib/crypto.js

@@ -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 };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc