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

jsonld-signatures

Package Overview
Dependencies
Maintainers
3
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonld-signatures - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

README.md~

2

bower.json
{
"name": "jsonld-signatures",
"version": "1.1.4",
"version": "1.1.5",
"moduleType": [

@@ -5,0 +5,0 @@ "amd"

@@ -805,6 +805,11 @@ /**

return function(input, options, callback) {
var crypto = api.use('crypto');
var signer = crypto.createSign('RSA-SHA256');
signer.update(_getDataToHash(input, options), 'utf8');
var signature = signer.sign(options.privateKeyPem, 'base64');
var signature;
try {
var crypto = api.use('crypto');
var signer = crypto.createSign('RSA-SHA256');
signer.update(_getDataToHash(input, options), 'utf8');
signature = signer.sign(options.privateKeyPem, 'base64');
} catch(err) {
return callback(err);
}
callback(null, signature);

@@ -814,7 +819,12 @@ };

return function(input, options, callback) {
var forge = api.use('forge');
var privateKey = forge.pki.privateKeyFromPem(options.privateKeyPem);
var md = forge.md.sha256.create();
md.update(_getDataToHash(input, options), 'utf8');
var signature = forge.util.encode64(privateKey.sign(md));
var signature;
try {
var forge = api.use('forge');
var privateKey = forge.pki.privateKeyFromPem(options.privateKeyPem);
var md = forge.md.sha256.create();
md.update(_getDataToHash(input, options), 'utf8');
signature = forge.util.encode64(privateKey.sign(md));
} catch(err) {
return callback(err);
}
callback(null, signature);

@@ -821,0 +831,0 @@ };

{
"name": "jsonld-signatures",
"version": "1.1.4",
"version": "1.1.5",
"description": "An implementation of the Linked Data Signatures specification for JSON-LD in node.js.",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/digitalbazaar/jsonld-signatures",

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