Skip to content

Commit

Permalink
Merge branch 'release/0.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
nwtgck committed Aug 16, 2020
2 parents d26434e + 234f0d3 commit 74fc8a3
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 61 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)

## [Unreleased]

## 0.1.4 - 2020-08-16
### Changed
* Update dependencies

### Fixed
* Sort keys in JSON [#45](https://github.com/nwtgck/jwk-thumbprint-npm/pull/45) by [@mitar](https://github.com/mitar)

[Unreleased]: https://github.com/nwtgck/jwk-thumbprint-npm/compare/v0.1.4...HEAD
126 changes: 69 additions & 57 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jwk-thumbprint",
"version": "0.1.3",
"version": "0.1.4",
"description": "JWK Thumbprint",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand All @@ -20,7 +20,7 @@
"author": "Ryo Ota",
"license": "MIT",
"devDependencies": {
"@types/js-base64": "^2.3.1",
"@types/js-base64": "^3.0.0",
"@types/mocha": "^7.0.1",
"@types/power-assert": "^1.5.3",
"espower-typescript": "^9.0.2",
Expand All @@ -31,6 +31,6 @@
},
"dependencies": {
"hash.js": "^1.1.7",
"js-base64": "^2.5.1"
"js-base64": "^3.2.4"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function jwkThumbprintByEncoding<Ec extends Encodings>(jwk: JsonWebKey, h

// JSON string sorted by keys
// (from: https://stackoverflow.com/a/16168003/2885946)
const jsonStr = JSON.stringify(canonicalJwk, Object.keys(canonicalJwk));
const jsonStr = JSON.stringify(canonicalJwk, Object.keys(canonicalJwk).sort());

const digest: Sha256 | Sha512 = (() => {
switch (hashAlg) {
Expand Down

0 comments on commit 74fc8a3

Please sign in to comment.