Skip to content

Commit

Permalink
Merge branch 'release/v0.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-xu committed Apr 15, 2019
2 parents a4b0ecb + 4e9ad71 commit 07e7dfe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "did-jwt",
"version": "0.1.2",
"version": "0.1.3",
"description": "Library for Signing and Verifying JWTs compatible uPort and DID standards",
"main": "lib/index.js",
"source": "src/index.js",
Expand Down Expand Up @@ -52,7 +52,7 @@
"regenerator-runtime": "^0.11.1",
"sinon": "^4.0.1",
"standard": "^12.0.1",
"uport-did-resolver": "0.0.6",
"uport-did-resolver": "0.0.7",
"webpack": "^3.11.0"
},
"dependencies": {
Expand Down
6 changes: 5 additions & 1 deletion src/NaclSigner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
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, '')
}

/**
* The NaclSigner returns a configured function for signing data using the Ed25519 algorithm. It also defines
* an interface that you can also implement yourself and use in our other modules.
Expand Down

0 comments on commit 07e7dfe

Please sign in to comment.