@sd-jwt/hash 0.9.3-next.2 → 0.9.3-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -5
- package/dist/index.mjs +1 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
hasher: () => hasher,
|
|
24
24
|
sha256: () => sha256
|
|
25
25
|
});
|
|
26
|
-
module.exports = __toCommonJS(
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
27
|
|
|
28
28
|
// src/sha256.ts
|
|
29
29
|
var import_sha256 = require("@noble/hashes/sha256");
|
|
@@ -47,8 +47,7 @@ function toUTF8Array(str) {
|
|
|
47
47
|
const utf8 = [];
|
|
48
48
|
for (let i = 0; i < str.length; i++) {
|
|
49
49
|
let charcode = str.charCodeAt(i);
|
|
50
|
-
if (charcode < 128)
|
|
51
|
-
utf8.push(charcode);
|
|
50
|
+
if (charcode < 128) utf8.push(charcode);
|
|
52
51
|
else if (charcode < 2048) {
|
|
53
52
|
utf8.push(192 | charcode >> 6, 128 | charcode & 63);
|
|
54
53
|
} else if (charcode < 55296 || charcode >= 57344) {
|
package/dist/index.mjs
CHANGED
|
@@ -20,8 +20,7 @@ function toUTF8Array(str) {
|
|
|
20
20
|
const utf8 = [];
|
|
21
21
|
for (let i = 0; i < str.length; i++) {
|
|
22
22
|
let charcode = str.charCodeAt(i);
|
|
23
|
-
if (charcode < 128)
|
|
24
|
-
utf8.push(charcode);
|
|
23
|
+
if (charcode < 128) utf8.push(charcode);
|
|
25
24
|
else if (charcode < 2048) {
|
|
26
25
|
utf8.push(192 | charcode >> 6, 128 | charcode & 63);
|
|
27
26
|
} else if (charcode < 55296 || charcode >= 57344) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sd-jwt/hash",
|
|
3
|
-
"version": "0.9.3-next.
|
|
3
|
+
"version": "0.9.3-next.4+cc455a6",
|
|
4
4
|
"description": "sd-jwt draft 7 implementation in typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@sd-jwt/crypto-nodejs": "0.9.3-next.
|
|
41
|
+
"@sd-jwt/crypto-nodejs": "0.9.3-next.4+cc455a6"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@noble/hashes": "1.0.0",
|
|
45
|
-
"@sd-jwt/utils": "0.9.3-next.
|
|
45
|
+
"@sd-jwt/utils": "0.9.3-next.4+cc455a6"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"esm"
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "cc455a6f3d431fa59cca1d21dad49daac135d3bc"
|
|
64
64
|
}
|