@springmicro/auth 0.2.0-alpha.3 → 0.2.0
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/README.md +1 -0
- package/dist/{Index-652aeb8c-BTQ1rBi7.js → Index-652aeb8c-CnQjaQIW.js} +1 -1
- package/dist/{Index-c419311f-BOZhAAW3.js → Index-c419311f-C4ismbFI.js} +1 -1
- package/dist/{Web3Auth-hACKSouN.js → Web3Auth-bM2cUiiC.js} +4712 -4694
- package/dist/hmac-CGR-aDxj.js +47 -0
- package/dist/{index-Dt6M8ha9.js → index-6lyEypQV.js} +1 -1
- package/dist/index-C6mFEZgd.js +14043 -0
- package/dist/{index-Dg8m-Szw.js → index-CSySSnNv.js} +1 -1
- package/dist/{index-BaYEABY7.js → index-CWOsToua.js} +2 -2
- package/dist/{index-BHkXn9Ss.js → index-DhlCF-kH.js} +2 -2
- package/dist/{index-CynP9H3X.js → index-DsVRaLEN.js} +1826 -1861
- package/dist/{index-DtJfAdfq.js → index-UIY0HLkp.js} +14 -7
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +279 -254
- package/dist/number-CgDDPrEe.js +1291 -0
- package/dist/sha256-JJGtJ2gn.js +325 -0
- package/package.json +2 -2
- package/dist/index-klU8YB0c.js +0 -1983
- package/dist/number-BXHWhlom.js +0 -1529
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { H as u, h as l, t as H, e as r, b as p } from "./sha256-JJGtJ2gn.js";
|
|
2
|
+
class o extends u {
|
|
3
|
+
constructor(t, i) {
|
|
4
|
+
super(), this.finished = !1, this.destroyed = !1, l(t);
|
|
5
|
+
const h = H(i);
|
|
6
|
+
if (this.iHash = t.create(), typeof this.iHash.update != "function")
|
|
7
|
+
throw new Error("Expected instance of class which extends utils.Hash");
|
|
8
|
+
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
9
|
+
const a = this.blockLen, e = new Uint8Array(a);
|
|
10
|
+
e.set(h.length > a ? t.create().update(h).digest() : h);
|
|
11
|
+
for (let s = 0; s < e.length; s++)
|
|
12
|
+
e[s] ^= 54;
|
|
13
|
+
this.iHash.update(e), this.oHash = t.create();
|
|
14
|
+
for (let s = 0; s < e.length; s++)
|
|
15
|
+
e[s] ^= 106;
|
|
16
|
+
this.oHash.update(e), e.fill(0);
|
|
17
|
+
}
|
|
18
|
+
update(t) {
|
|
19
|
+
return r(this), this.iHash.update(t), this;
|
|
20
|
+
}
|
|
21
|
+
digestInto(t) {
|
|
22
|
+
r(this), p(t, this.outputLen), this.finished = !0, this.iHash.digestInto(t), this.oHash.update(t), this.oHash.digestInto(t), this.destroy();
|
|
23
|
+
}
|
|
24
|
+
digest() {
|
|
25
|
+
const t = new Uint8Array(this.oHash.outputLen);
|
|
26
|
+
return this.digestInto(t), t;
|
|
27
|
+
}
|
|
28
|
+
_cloneInto(t) {
|
|
29
|
+
t || (t = Object.create(Object.getPrototypeOf(this), {}));
|
|
30
|
+
const { oHash: i, iHash: h, finished: a, destroyed: e, blockLen: s, outputLen: c } = this;
|
|
31
|
+
return t = t, t.finished = a, t.destroyed = e, t.blockLen = s, t.outputLen = c, t.oHash = i._cloneInto(t.oHash), t.iHash = h._cloneInto(t.iHash), t;
|
|
32
|
+
}
|
|
33
|
+
destroy() {
|
|
34
|
+
this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const d = (n, t, i) => new o(n, t).update(i).digest();
|
|
38
|
+
d.create = (n, t) => new o(n, t);
|
|
39
|
+
const y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
40
|
+
__proto__: null,
|
|
41
|
+
HMAC: o,
|
|
42
|
+
hmac: d
|
|
43
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
44
|
+
export {
|
|
45
|
+
y as a,
|
|
46
|
+
d as h
|
|
47
|
+
};
|