Comparing version 0.1.2 to 0.1.3-alpha.1
@@ -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
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
622536
17717