@ocap/mcrypto 1.29.5 → 1.29.7
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/esm/_virtual/rolldown_runtime.mjs +32 -0
- package/esm/hasher/keccak.d.mts +1 -0
- package/esm/hasher/keccak.mjs +15 -5
- package/esm/hasher/sha2.d.mts +1 -0
- package/esm/hasher/sha2.mjs +8 -5
- package/esm/hasher/sha3.d.mts +1 -0
- package/esm/hasher/sha3.mjs +15 -5
- package/esm/node_modules/hash.js/lib/hash/common.mjs +77 -0
- package/esm/node_modules/hash.js/lib/hash/hmac.mjs +41 -0
- package/esm/node_modules/hash.js/lib/hash/ripemd.mjs +422 -0
- package/esm/node_modules/hash.js/lib/hash/sha/1.mjs +73 -0
- package/esm/node_modules/hash.js/lib/hash/sha/224.mjs +38 -0
- package/esm/node_modules/hash.js/lib/hash/sha/256.mjs +154 -0
- package/esm/node_modules/hash.js/lib/hash/sha/384.mjs +46 -0
- package/esm/node_modules/hash.js/lib/hash/sha/512.mjs +389 -0
- package/esm/node_modules/hash.js/lib/hash/sha/common.mjs +46 -0
- package/esm/node_modules/hash.js/lib/hash/sha.mjs +20 -0
- package/esm/node_modules/hash.js/lib/hash/utils.mjs +211 -0
- package/esm/node_modules/hash.js/lib/hash.mjs +27 -0
- package/esm/node_modules/inherits/inherits.mjs +20 -0
- package/esm/node_modules/inherits/inherits_browser.mjs +30 -0
- package/esm/node_modules/minimalistic-assert/index.mjs +17 -0
- package/esm/signer/ed25519.mjs +4 -2
- package/lib/_virtual/rolldown_runtime.cjs +2 -0
- package/lib/hasher/keccak.cjs +15 -6
- package/lib/hasher/keccak.d.cts +1 -0
- package/lib/hasher/sha2.cjs +12 -8
- package/lib/hasher/sha2.d.cts +1 -0
- package/lib/hasher/sha3.cjs +15 -6
- package/lib/hasher/sha3.d.cts +1 -0
- package/lib/node_modules/hash.js/lib/hash/common.cjs +82 -0
- package/lib/node_modules/hash.js/lib/hash/hmac.cjs +46 -0
- package/lib/node_modules/hash.js/lib/hash/ripemd.cjs +427 -0
- package/lib/node_modules/hash.js/lib/hash/sha/1.cjs +78 -0
- package/lib/node_modules/hash.js/lib/hash/sha/224.cjs +43 -0
- package/lib/node_modules/hash.js/lib/hash/sha/256.cjs +159 -0
- package/lib/node_modules/hash.js/lib/hash/sha/384.cjs +51 -0
- package/lib/node_modules/hash.js/lib/hash/sha/512.cjs +394 -0
- package/lib/node_modules/hash.js/lib/hash/sha/common.cjs +51 -0
- package/lib/node_modules/hash.js/lib/hash/sha.cjs +25 -0
- package/lib/node_modules/hash.js/lib/hash/utils.cjs +216 -0
- package/lib/node_modules/hash.js/lib/hash.cjs +30 -0
- package/lib/node_modules/inherits/inherits.cjs +23 -0
- package/lib/node_modules/inherits/inherits_browser.cjs +33 -0
- package/lib/node_modules/minimalistic-assert/index.cjs +20 -0
- package/lib/signer/ed25519.cjs +3 -3
- package/package.json +6 -6
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
+
key = keys[i];
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
16
|
+
__defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
28
|
+
}) : target, mod));
|
|
29
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { __commonJSMin, __require, __toESM };
|
package/esm/hasher/keccak.d.mts
CHANGED
package/esm/hasher/keccak.mjs
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { encode } from "../encode.mjs";
|
|
2
2
|
import { toUint8Array } from "@ocap/util";
|
|
3
|
-
import
|
|
3
|
+
import { keccak_224, keccak_256, keccak_384, keccak_512 } from "@noble/hashes/sha3.js";
|
|
4
|
+
import { bytesToHex } from "@noble/hashes/utils.js";
|
|
4
5
|
|
|
5
6
|
//#region src/hasher/keccak.ts
|
|
7
|
+
const hashFns = {
|
|
8
|
+
keccak_224,
|
|
9
|
+
keccak_256,
|
|
10
|
+
keccak_384,
|
|
11
|
+
keccak_512
|
|
12
|
+
};
|
|
6
13
|
/**
|
|
7
14
|
* Keccak support with different hash length
|
|
15
|
+
* Uses @noble/hashes for unified implementation
|
|
8
16
|
*
|
|
9
17
|
* @class KeccakHasher
|
|
10
18
|
*/
|
|
@@ -17,17 +25,19 @@ var KeccakHasher = class {
|
|
|
17
25
|
512
|
|
18
26
|
].forEach((x) => {
|
|
19
27
|
const name = `hash${x}`;
|
|
20
|
-
const hasher =
|
|
28
|
+
const hasher = hashFns[`keccak_${x}`];
|
|
21
29
|
const hashFn = (input, round) => {
|
|
22
30
|
if (round === 1) return hasher(input);
|
|
23
31
|
return hashFn(hasher(input), round - 1);
|
|
24
32
|
};
|
|
25
33
|
this[name] = (data, round = 1, encoding = "hex") => {
|
|
26
|
-
let input
|
|
34
|
+
let input;
|
|
27
35
|
try {
|
|
28
36
|
input = toUint8Array(data);
|
|
29
|
-
} catch (_err) {
|
|
30
|
-
|
|
37
|
+
} catch (_err) {
|
|
38
|
+
input = data;
|
|
39
|
+
}
|
|
40
|
+
return encode(`0x${bytesToHex(hashFn(input, round))}`, encoding);
|
|
31
41
|
};
|
|
32
42
|
});
|
|
33
43
|
}
|
package/esm/hasher/sha2.d.mts
CHANGED
package/esm/hasher/sha2.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { encode } from "../encode.mjs";
|
|
2
2
|
import { toUint8Array } from "@ocap/util";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import { bytesToHex } from "@noble/hashes/utils.js";
|
|
4
|
+
import { sha224, sha256, sha384, sha512 } from "@noble/hashes/sha2.js";
|
|
5
5
|
|
|
6
6
|
//#region src/hasher/sha2.ts
|
|
7
7
|
const hashFns = {
|
|
@@ -12,6 +12,7 @@ const hashFns = {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Sha2 support with different hash length
|
|
15
|
+
* Uses @noble/hashes for better performance
|
|
15
16
|
*
|
|
16
17
|
* @class
|
|
17
18
|
*/
|
|
@@ -26,11 +27,13 @@ var Sha2Hasher = class {
|
|
|
26
27
|
const name = `hash${x}`;
|
|
27
28
|
const hasher = hashFns[`sha${x}`];
|
|
28
29
|
const hashFn = (input, round) => {
|
|
29
|
-
let inputBytes
|
|
30
|
+
let inputBytes;
|
|
30
31
|
try {
|
|
31
32
|
inputBytes = toUint8Array(input);
|
|
32
|
-
} catch (_err) {
|
|
33
|
-
|
|
33
|
+
} catch (_err) {
|
|
34
|
+
inputBytes = input;
|
|
35
|
+
}
|
|
36
|
+
if (round === 1) return `0x${bytesToHex(hasher(inputBytes))}`;
|
|
34
37
|
return hashFn(hashFn(inputBytes, 1), round - 1);
|
|
35
38
|
};
|
|
36
39
|
this[name] = (data, round = 2, encoding = "hex") => {
|
package/esm/hasher/sha3.d.mts
CHANGED
package/esm/hasher/sha3.mjs
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { encode } from "../encode.mjs";
|
|
2
2
|
import { toUint8Array } from "@ocap/util";
|
|
3
|
-
import
|
|
3
|
+
import { sha3_224, sha3_256, sha3_384, sha3_512 } from "@noble/hashes/sha3.js";
|
|
4
|
+
import { bytesToHex } from "@noble/hashes/utils.js";
|
|
4
5
|
|
|
5
6
|
//#region src/hasher/sha3.ts
|
|
7
|
+
const hashFns = {
|
|
8
|
+
sha3_224,
|
|
9
|
+
sha3_256,
|
|
10
|
+
sha3_384,
|
|
11
|
+
sha3_512
|
|
12
|
+
};
|
|
6
13
|
/**
|
|
7
14
|
* Sha3 support with different hash length
|
|
15
|
+
* Uses @noble/hashes for unified implementation
|
|
8
16
|
*
|
|
9
17
|
* @class Sha3Hasher
|
|
10
18
|
*/
|
|
@@ -17,17 +25,19 @@ var Sha3Hasher = class {
|
|
|
17
25
|
512
|
|
18
26
|
].forEach((x) => {
|
|
19
27
|
const name = `hash${x}`;
|
|
20
|
-
const hasher =
|
|
28
|
+
const hasher = hashFns[`sha3_${x}`];
|
|
21
29
|
const hashFn = (input, round) => {
|
|
22
30
|
if (round === 1) return hasher(input);
|
|
23
31
|
return hashFn(hasher(input), round - 1);
|
|
24
32
|
};
|
|
25
33
|
this[name] = (data, round = 1, encoding = "hex") => {
|
|
26
|
-
let input
|
|
34
|
+
let input;
|
|
27
35
|
try {
|
|
28
36
|
input = toUint8Array(data);
|
|
29
|
-
} catch (_err) {
|
|
30
|
-
|
|
37
|
+
} catch (_err) {
|
|
38
|
+
input = data;
|
|
39
|
+
}
|
|
40
|
+
return encode(`0x${bytesToHex(hashFn(input, round))}`, encoding);
|
|
31
41
|
};
|
|
32
42
|
});
|
|
33
43
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_minimalistic_assert } from "../../../minimalistic-assert/index.mjs";
|
|
3
|
+
import { require_utils } from "./utils.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/hash.js/lib/hash/common.js
|
|
6
|
+
var require_common = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
+
var utils = require_utils();
|
|
8
|
+
var assert = require_minimalistic_assert();
|
|
9
|
+
function BlockHash() {
|
|
10
|
+
this.pending = null;
|
|
11
|
+
this.pendingTotal = 0;
|
|
12
|
+
this.blockSize = this.constructor.blockSize;
|
|
13
|
+
this.outSize = this.constructor.outSize;
|
|
14
|
+
this.hmacStrength = this.constructor.hmacStrength;
|
|
15
|
+
this.padLength = this.constructor.padLength / 8;
|
|
16
|
+
this.endian = "big";
|
|
17
|
+
this._delta8 = this.blockSize / 8;
|
|
18
|
+
this._delta32 = this.blockSize / 32;
|
|
19
|
+
}
|
|
20
|
+
exports.BlockHash = BlockHash;
|
|
21
|
+
BlockHash.prototype.update = function update(msg, enc) {
|
|
22
|
+
msg = utils.toArray(msg, enc);
|
|
23
|
+
if (!this.pending) this.pending = msg;
|
|
24
|
+
else this.pending = this.pending.concat(msg);
|
|
25
|
+
this.pendingTotal += msg.length;
|
|
26
|
+
if (this.pending.length >= this._delta8) {
|
|
27
|
+
msg = this.pending;
|
|
28
|
+
var r = msg.length % this._delta8;
|
|
29
|
+
this.pending = msg.slice(msg.length - r, msg.length);
|
|
30
|
+
if (this.pending.length === 0) this.pending = null;
|
|
31
|
+
msg = utils.join32(msg, 0, msg.length - r, this.endian);
|
|
32
|
+
for (var i = 0; i < msg.length; i += this._delta32) this._update(msg, i, i + this._delta32);
|
|
33
|
+
}
|
|
34
|
+
return this;
|
|
35
|
+
};
|
|
36
|
+
BlockHash.prototype.digest = function digest(enc) {
|
|
37
|
+
this.update(this._pad());
|
|
38
|
+
assert(this.pending === null);
|
|
39
|
+
return this._digest(enc);
|
|
40
|
+
};
|
|
41
|
+
BlockHash.prototype._pad = function pad() {
|
|
42
|
+
var len = this.pendingTotal;
|
|
43
|
+
var bytes = this._delta8;
|
|
44
|
+
var k = bytes - (len + this.padLength) % bytes;
|
|
45
|
+
var res = new Array(k + this.padLength);
|
|
46
|
+
res[0] = 128;
|
|
47
|
+
for (var i = 1; i < k; i++) res[i] = 0;
|
|
48
|
+
len <<= 3;
|
|
49
|
+
if (this.endian === "big") {
|
|
50
|
+
for (var t = 8; t < this.padLength; t++) res[i++] = 0;
|
|
51
|
+
res[i++] = 0;
|
|
52
|
+
res[i++] = 0;
|
|
53
|
+
res[i++] = 0;
|
|
54
|
+
res[i++] = 0;
|
|
55
|
+
res[i++] = len >>> 24 & 255;
|
|
56
|
+
res[i++] = len >>> 16 & 255;
|
|
57
|
+
res[i++] = len >>> 8 & 255;
|
|
58
|
+
res[i++] = len & 255;
|
|
59
|
+
} else {
|
|
60
|
+
res[i++] = len & 255;
|
|
61
|
+
res[i++] = len >>> 8 & 255;
|
|
62
|
+
res[i++] = len >>> 16 & 255;
|
|
63
|
+
res[i++] = len >>> 24 & 255;
|
|
64
|
+
res[i++] = 0;
|
|
65
|
+
res[i++] = 0;
|
|
66
|
+
res[i++] = 0;
|
|
67
|
+
res[i++] = 0;
|
|
68
|
+
for (t = 8; t < this.padLength; t++) res[i++] = 0;
|
|
69
|
+
}
|
|
70
|
+
return res;
|
|
71
|
+
};
|
|
72
|
+
}));
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
export default require_common();
|
|
76
|
+
|
|
77
|
+
export { require_common };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_minimalistic_assert } from "../../../minimalistic-assert/index.mjs";
|
|
3
|
+
import { require_utils } from "./utils.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/hash.js/lib/hash/hmac.js
|
|
6
|
+
var require_hmac = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7
|
+
var utils = require_utils();
|
|
8
|
+
var assert = require_minimalistic_assert();
|
|
9
|
+
function Hmac(hash, key, enc) {
|
|
10
|
+
if (!(this instanceof Hmac)) return new Hmac(hash, key, enc);
|
|
11
|
+
this.Hash = hash;
|
|
12
|
+
this.blockSize = hash.blockSize / 8;
|
|
13
|
+
this.outSize = hash.outSize / 8;
|
|
14
|
+
this.inner = null;
|
|
15
|
+
this.outer = null;
|
|
16
|
+
this._init(utils.toArray(key, enc));
|
|
17
|
+
}
|
|
18
|
+
module.exports = Hmac;
|
|
19
|
+
Hmac.prototype._init = function init(key) {
|
|
20
|
+
if (key.length > this.blockSize) key = new this.Hash().update(key).digest();
|
|
21
|
+
assert(key.length <= this.blockSize);
|
|
22
|
+
for (var i = key.length; i < this.blockSize; i++) key.push(0);
|
|
23
|
+
for (i = 0; i < key.length; i++) key[i] ^= 54;
|
|
24
|
+
this.inner = new this.Hash().update(key);
|
|
25
|
+
for (i = 0; i < key.length; i++) key[i] ^= 106;
|
|
26
|
+
this.outer = new this.Hash().update(key);
|
|
27
|
+
};
|
|
28
|
+
Hmac.prototype.update = function update(msg, enc) {
|
|
29
|
+
this.inner.update(msg, enc);
|
|
30
|
+
return this;
|
|
31
|
+
};
|
|
32
|
+
Hmac.prototype.digest = function digest(enc) {
|
|
33
|
+
this.outer.update(this.inner.digest());
|
|
34
|
+
return this.outer.digest(enc);
|
|
35
|
+
};
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export default require_hmac();
|
|
40
|
+
|
|
41
|
+
export { require_hmac };
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { require_utils } from "./utils.mjs";
|
|
3
|
+
import { require_common } from "./common.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/hash.js/lib/hash/ripemd.js
|
|
6
|
+
var require_ripemd = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
+
var utils = require_utils();
|
|
8
|
+
var common = require_common();
|
|
9
|
+
var rotl32 = utils.rotl32;
|
|
10
|
+
var sum32 = utils.sum32;
|
|
11
|
+
var sum32_3 = utils.sum32_3;
|
|
12
|
+
var sum32_4 = utils.sum32_4;
|
|
13
|
+
var BlockHash = common.BlockHash;
|
|
14
|
+
function RIPEMD160() {
|
|
15
|
+
if (!(this instanceof RIPEMD160)) return new RIPEMD160();
|
|
16
|
+
BlockHash.call(this);
|
|
17
|
+
this.h = [
|
|
18
|
+
1732584193,
|
|
19
|
+
4023233417,
|
|
20
|
+
2562383102,
|
|
21
|
+
271733878,
|
|
22
|
+
3285377520
|
|
23
|
+
];
|
|
24
|
+
this.endian = "little";
|
|
25
|
+
}
|
|
26
|
+
utils.inherits(RIPEMD160, BlockHash);
|
|
27
|
+
exports.ripemd160 = RIPEMD160;
|
|
28
|
+
RIPEMD160.blockSize = 512;
|
|
29
|
+
RIPEMD160.outSize = 160;
|
|
30
|
+
RIPEMD160.hmacStrength = 192;
|
|
31
|
+
RIPEMD160.padLength = 64;
|
|
32
|
+
RIPEMD160.prototype._update = function update(msg, start) {
|
|
33
|
+
var A = this.h[0];
|
|
34
|
+
var B = this.h[1];
|
|
35
|
+
var C = this.h[2];
|
|
36
|
+
var D = this.h[3];
|
|
37
|
+
var E = this.h[4];
|
|
38
|
+
var Ah = A;
|
|
39
|
+
var Bh = B;
|
|
40
|
+
var Ch = C;
|
|
41
|
+
var Dh = D;
|
|
42
|
+
var Eh = E;
|
|
43
|
+
for (var j = 0; j < 80; j++) {
|
|
44
|
+
var T = sum32(rotl32(sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), s[j]), E);
|
|
45
|
+
A = E;
|
|
46
|
+
E = D;
|
|
47
|
+
D = rotl32(C, 10);
|
|
48
|
+
C = B;
|
|
49
|
+
B = T;
|
|
50
|
+
T = sum32(rotl32(sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), sh[j]), Eh);
|
|
51
|
+
Ah = Eh;
|
|
52
|
+
Eh = Dh;
|
|
53
|
+
Dh = rotl32(Ch, 10);
|
|
54
|
+
Ch = Bh;
|
|
55
|
+
Bh = T;
|
|
56
|
+
}
|
|
57
|
+
T = sum32_3(this.h[1], C, Dh);
|
|
58
|
+
this.h[1] = sum32_3(this.h[2], D, Eh);
|
|
59
|
+
this.h[2] = sum32_3(this.h[3], E, Ah);
|
|
60
|
+
this.h[3] = sum32_3(this.h[4], A, Bh);
|
|
61
|
+
this.h[4] = sum32_3(this.h[0], B, Ch);
|
|
62
|
+
this.h[0] = T;
|
|
63
|
+
};
|
|
64
|
+
RIPEMD160.prototype._digest = function digest(enc) {
|
|
65
|
+
if (enc === "hex") return utils.toHex32(this.h, "little");
|
|
66
|
+
else return utils.split32(this.h, "little");
|
|
67
|
+
};
|
|
68
|
+
function f(j, x, y, z) {
|
|
69
|
+
if (j <= 15) return x ^ y ^ z;
|
|
70
|
+
else if (j <= 31) return x & y | ~x & z;
|
|
71
|
+
else if (j <= 47) return (x | ~y) ^ z;
|
|
72
|
+
else if (j <= 63) return x & z | y & ~z;
|
|
73
|
+
else return x ^ (y | ~z);
|
|
74
|
+
}
|
|
75
|
+
function K(j) {
|
|
76
|
+
if (j <= 15) return 0;
|
|
77
|
+
else if (j <= 31) return 1518500249;
|
|
78
|
+
else if (j <= 47) return 1859775393;
|
|
79
|
+
else if (j <= 63) return 2400959708;
|
|
80
|
+
else return 2840853838;
|
|
81
|
+
}
|
|
82
|
+
function Kh(j) {
|
|
83
|
+
if (j <= 15) return 1352829926;
|
|
84
|
+
else if (j <= 31) return 1548603684;
|
|
85
|
+
else if (j <= 47) return 1836072691;
|
|
86
|
+
else if (j <= 63) return 2053994217;
|
|
87
|
+
else return 0;
|
|
88
|
+
}
|
|
89
|
+
var r = [
|
|
90
|
+
0,
|
|
91
|
+
1,
|
|
92
|
+
2,
|
|
93
|
+
3,
|
|
94
|
+
4,
|
|
95
|
+
5,
|
|
96
|
+
6,
|
|
97
|
+
7,
|
|
98
|
+
8,
|
|
99
|
+
9,
|
|
100
|
+
10,
|
|
101
|
+
11,
|
|
102
|
+
12,
|
|
103
|
+
13,
|
|
104
|
+
14,
|
|
105
|
+
15,
|
|
106
|
+
7,
|
|
107
|
+
4,
|
|
108
|
+
13,
|
|
109
|
+
1,
|
|
110
|
+
10,
|
|
111
|
+
6,
|
|
112
|
+
15,
|
|
113
|
+
3,
|
|
114
|
+
12,
|
|
115
|
+
0,
|
|
116
|
+
9,
|
|
117
|
+
5,
|
|
118
|
+
2,
|
|
119
|
+
14,
|
|
120
|
+
11,
|
|
121
|
+
8,
|
|
122
|
+
3,
|
|
123
|
+
10,
|
|
124
|
+
14,
|
|
125
|
+
4,
|
|
126
|
+
9,
|
|
127
|
+
15,
|
|
128
|
+
8,
|
|
129
|
+
1,
|
|
130
|
+
2,
|
|
131
|
+
7,
|
|
132
|
+
0,
|
|
133
|
+
6,
|
|
134
|
+
13,
|
|
135
|
+
11,
|
|
136
|
+
5,
|
|
137
|
+
12,
|
|
138
|
+
1,
|
|
139
|
+
9,
|
|
140
|
+
11,
|
|
141
|
+
10,
|
|
142
|
+
0,
|
|
143
|
+
8,
|
|
144
|
+
12,
|
|
145
|
+
4,
|
|
146
|
+
13,
|
|
147
|
+
3,
|
|
148
|
+
7,
|
|
149
|
+
15,
|
|
150
|
+
14,
|
|
151
|
+
5,
|
|
152
|
+
6,
|
|
153
|
+
2,
|
|
154
|
+
4,
|
|
155
|
+
0,
|
|
156
|
+
5,
|
|
157
|
+
9,
|
|
158
|
+
7,
|
|
159
|
+
12,
|
|
160
|
+
2,
|
|
161
|
+
10,
|
|
162
|
+
14,
|
|
163
|
+
1,
|
|
164
|
+
3,
|
|
165
|
+
8,
|
|
166
|
+
11,
|
|
167
|
+
6,
|
|
168
|
+
15,
|
|
169
|
+
13
|
|
170
|
+
];
|
|
171
|
+
var rh = [
|
|
172
|
+
5,
|
|
173
|
+
14,
|
|
174
|
+
7,
|
|
175
|
+
0,
|
|
176
|
+
9,
|
|
177
|
+
2,
|
|
178
|
+
11,
|
|
179
|
+
4,
|
|
180
|
+
13,
|
|
181
|
+
6,
|
|
182
|
+
15,
|
|
183
|
+
8,
|
|
184
|
+
1,
|
|
185
|
+
10,
|
|
186
|
+
3,
|
|
187
|
+
12,
|
|
188
|
+
6,
|
|
189
|
+
11,
|
|
190
|
+
3,
|
|
191
|
+
7,
|
|
192
|
+
0,
|
|
193
|
+
13,
|
|
194
|
+
5,
|
|
195
|
+
10,
|
|
196
|
+
14,
|
|
197
|
+
15,
|
|
198
|
+
8,
|
|
199
|
+
12,
|
|
200
|
+
4,
|
|
201
|
+
9,
|
|
202
|
+
1,
|
|
203
|
+
2,
|
|
204
|
+
15,
|
|
205
|
+
5,
|
|
206
|
+
1,
|
|
207
|
+
3,
|
|
208
|
+
7,
|
|
209
|
+
14,
|
|
210
|
+
6,
|
|
211
|
+
9,
|
|
212
|
+
11,
|
|
213
|
+
8,
|
|
214
|
+
12,
|
|
215
|
+
2,
|
|
216
|
+
10,
|
|
217
|
+
0,
|
|
218
|
+
4,
|
|
219
|
+
13,
|
|
220
|
+
8,
|
|
221
|
+
6,
|
|
222
|
+
4,
|
|
223
|
+
1,
|
|
224
|
+
3,
|
|
225
|
+
11,
|
|
226
|
+
15,
|
|
227
|
+
0,
|
|
228
|
+
5,
|
|
229
|
+
12,
|
|
230
|
+
2,
|
|
231
|
+
13,
|
|
232
|
+
9,
|
|
233
|
+
7,
|
|
234
|
+
10,
|
|
235
|
+
14,
|
|
236
|
+
12,
|
|
237
|
+
15,
|
|
238
|
+
10,
|
|
239
|
+
4,
|
|
240
|
+
1,
|
|
241
|
+
5,
|
|
242
|
+
8,
|
|
243
|
+
7,
|
|
244
|
+
6,
|
|
245
|
+
2,
|
|
246
|
+
13,
|
|
247
|
+
14,
|
|
248
|
+
0,
|
|
249
|
+
3,
|
|
250
|
+
9,
|
|
251
|
+
11
|
|
252
|
+
];
|
|
253
|
+
var s = [
|
|
254
|
+
11,
|
|
255
|
+
14,
|
|
256
|
+
15,
|
|
257
|
+
12,
|
|
258
|
+
5,
|
|
259
|
+
8,
|
|
260
|
+
7,
|
|
261
|
+
9,
|
|
262
|
+
11,
|
|
263
|
+
13,
|
|
264
|
+
14,
|
|
265
|
+
15,
|
|
266
|
+
6,
|
|
267
|
+
7,
|
|
268
|
+
9,
|
|
269
|
+
8,
|
|
270
|
+
7,
|
|
271
|
+
6,
|
|
272
|
+
8,
|
|
273
|
+
13,
|
|
274
|
+
11,
|
|
275
|
+
9,
|
|
276
|
+
7,
|
|
277
|
+
15,
|
|
278
|
+
7,
|
|
279
|
+
12,
|
|
280
|
+
15,
|
|
281
|
+
9,
|
|
282
|
+
11,
|
|
283
|
+
7,
|
|
284
|
+
13,
|
|
285
|
+
12,
|
|
286
|
+
11,
|
|
287
|
+
13,
|
|
288
|
+
6,
|
|
289
|
+
7,
|
|
290
|
+
14,
|
|
291
|
+
9,
|
|
292
|
+
13,
|
|
293
|
+
15,
|
|
294
|
+
14,
|
|
295
|
+
8,
|
|
296
|
+
13,
|
|
297
|
+
6,
|
|
298
|
+
5,
|
|
299
|
+
12,
|
|
300
|
+
7,
|
|
301
|
+
5,
|
|
302
|
+
11,
|
|
303
|
+
12,
|
|
304
|
+
14,
|
|
305
|
+
15,
|
|
306
|
+
14,
|
|
307
|
+
15,
|
|
308
|
+
9,
|
|
309
|
+
8,
|
|
310
|
+
9,
|
|
311
|
+
14,
|
|
312
|
+
5,
|
|
313
|
+
6,
|
|
314
|
+
8,
|
|
315
|
+
6,
|
|
316
|
+
5,
|
|
317
|
+
12,
|
|
318
|
+
9,
|
|
319
|
+
15,
|
|
320
|
+
5,
|
|
321
|
+
11,
|
|
322
|
+
6,
|
|
323
|
+
8,
|
|
324
|
+
13,
|
|
325
|
+
12,
|
|
326
|
+
5,
|
|
327
|
+
12,
|
|
328
|
+
13,
|
|
329
|
+
14,
|
|
330
|
+
11,
|
|
331
|
+
8,
|
|
332
|
+
5,
|
|
333
|
+
6
|
|
334
|
+
];
|
|
335
|
+
var sh = [
|
|
336
|
+
8,
|
|
337
|
+
9,
|
|
338
|
+
9,
|
|
339
|
+
11,
|
|
340
|
+
13,
|
|
341
|
+
15,
|
|
342
|
+
15,
|
|
343
|
+
5,
|
|
344
|
+
7,
|
|
345
|
+
7,
|
|
346
|
+
8,
|
|
347
|
+
11,
|
|
348
|
+
14,
|
|
349
|
+
14,
|
|
350
|
+
12,
|
|
351
|
+
6,
|
|
352
|
+
9,
|
|
353
|
+
13,
|
|
354
|
+
15,
|
|
355
|
+
7,
|
|
356
|
+
12,
|
|
357
|
+
8,
|
|
358
|
+
9,
|
|
359
|
+
11,
|
|
360
|
+
7,
|
|
361
|
+
7,
|
|
362
|
+
12,
|
|
363
|
+
7,
|
|
364
|
+
6,
|
|
365
|
+
15,
|
|
366
|
+
13,
|
|
367
|
+
11,
|
|
368
|
+
9,
|
|
369
|
+
7,
|
|
370
|
+
15,
|
|
371
|
+
11,
|
|
372
|
+
8,
|
|
373
|
+
6,
|
|
374
|
+
6,
|
|
375
|
+
14,
|
|
376
|
+
12,
|
|
377
|
+
13,
|
|
378
|
+
5,
|
|
379
|
+
14,
|
|
380
|
+
13,
|
|
381
|
+
13,
|
|
382
|
+
7,
|
|
383
|
+
5,
|
|
384
|
+
15,
|
|
385
|
+
5,
|
|
386
|
+
8,
|
|
387
|
+
11,
|
|
388
|
+
14,
|
|
389
|
+
14,
|
|
390
|
+
6,
|
|
391
|
+
14,
|
|
392
|
+
6,
|
|
393
|
+
9,
|
|
394
|
+
12,
|
|
395
|
+
9,
|
|
396
|
+
12,
|
|
397
|
+
5,
|
|
398
|
+
15,
|
|
399
|
+
8,
|
|
400
|
+
8,
|
|
401
|
+
5,
|
|
402
|
+
12,
|
|
403
|
+
9,
|
|
404
|
+
12,
|
|
405
|
+
5,
|
|
406
|
+
14,
|
|
407
|
+
6,
|
|
408
|
+
8,
|
|
409
|
+
13,
|
|
410
|
+
6,
|
|
411
|
+
5,
|
|
412
|
+
15,
|
|
413
|
+
13,
|
|
414
|
+
11,
|
|
415
|
+
11
|
|
416
|
+
];
|
|
417
|
+
}));
|
|
418
|
+
|
|
419
|
+
//#endregion
|
|
420
|
+
export default require_ripemd();
|
|
421
|
+
|
|
422
|
+
export { require_ripemd };
|