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

did-jwt

Package Overview
Dependencies
Maintainers
6
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

did-jwt - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3-alpha.1

9

lib/NaclSigner.js

@@ -13,4 +13,5 @@ "use strict";

var _naclDid = require("nacl-did");
function encodeBase64Url(data) {
return _tweetnaclUtil.default.encodeBase64(data).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
}
/**

@@ -31,2 +32,4 @@ * The NaclSigner returns a configured function for signing data using the Ed25519 algorithm. It also defines

*/
function NaclSigner(base64PrivateKey) {

@@ -45,3 +48,3 @@ var privateKey = _tweetnaclUtil.default.decodeBase64(base64PrivateKey);

case 0:
return _context.abrupt("return", (0, _naclDid.encodeBase64Url)(_tweetnacl.default.sign.detached(_tweetnaclUtil.default.decodeUTF8(data), privateKey)));
return _context.abrupt("return", encodeBase64Url(_tweetnacl.default.sign.detached(_tweetnaclUtil.default.decodeUTF8(data), privateKey)));

@@ -48,0 +51,0 @@ case 1:

{
"name": "did-jwt",
"version": "0.1.2",
"version": "0.1.3-alpha.1",
"description": "Library for Signing and Verifying JWTs compatible uPort and DID standards",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

import nacl from 'tweetnacl'
import naclutil from 'tweetnacl-util'
import { encodeBase64Url } from 'nacl-did'
function encodeBase64Url (data) {
return naclutil.encodeBase64(data).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '')
}
/**

@@ -5,0 +9,0 @@ * The NaclSigner returns a configured function for signing data using the Ed25519 algorithm. It also defines

Sorry, the diff of this file is too big to display

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