blake2.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. /**
  2. * blake2b (64-bit) & blake2s (8 to 32-bit) hash functions.
  3. * b could have been faster, but there is no fast u64 in js, so s is 1.5x faster.
  4. * @module
  5. */
  6. import { BSIGMA, G1s, G2s } from "./_blake.js";
  7. import { SHA256_IV } from "./_md.js";
  8. import * as u64 from "./_u64.js";
  9. // prettier-ignore
  10. import { abytes, aexists, anumber, aoutput, clean, createOptHasher, Hash, swap32IfBE, swap8IfBE, toBytes, u32 } from "./utils.js";
  11. // Same as SHA512_IV, but swapped endianness: LE instead of BE. iv[1] is iv[0], etc.
  12. const B2B_IV = /* @__PURE__ */ Uint32Array.from([
  13. 0xf3bcc908, 0x6a09e667, 0x84caa73b, 0xbb67ae85, 0xfe94f82b, 0x3c6ef372, 0x5f1d36f1, 0xa54ff53a,
  14. 0xade682d1, 0x510e527f, 0x2b3e6c1f, 0x9b05688c, 0xfb41bd6b, 0x1f83d9ab, 0x137e2179, 0x5be0cd19,
  15. ]);
  16. // Temporary buffer
  17. const BBUF = /* @__PURE__ */ new Uint32Array(32);
  18. // Mixing function G splitted in two halfs
  19. function G1b(a, b, c, d, msg, x) {
  20. // NOTE: V is LE here
  21. const Xl = msg[x], Xh = msg[x + 1]; // prettier-ignore
  22. let Al = BBUF[2 * a], Ah = BBUF[2 * a + 1]; // prettier-ignore
  23. let Bl = BBUF[2 * b], Bh = BBUF[2 * b + 1]; // prettier-ignore
  24. let Cl = BBUF[2 * c], Ch = BBUF[2 * c + 1]; // prettier-ignore
  25. let Dl = BBUF[2 * d], Dh = BBUF[2 * d + 1]; // prettier-ignore
  26. // v[a] = (v[a] + v[b] + x) | 0;
  27. let ll = u64.add3L(Al, Bl, Xl);
  28. Ah = u64.add3H(ll, Ah, Bh, Xh);
  29. Al = ll | 0;
  30. // v[d] = rotr(v[d] ^ v[a], 32)
  31. ({ Dh, Dl } = { Dh: Dh ^ Ah, Dl: Dl ^ Al });
  32. ({ Dh, Dl } = { Dh: u64.rotr32H(Dh, Dl), Dl: u64.rotr32L(Dh, Dl) });
  33. // v[c] = (v[c] + v[d]) | 0;
  34. ({ h: Ch, l: Cl } = u64.add(Ch, Cl, Dh, Dl));
  35. // v[b] = rotr(v[b] ^ v[c], 24)
  36. ({ Bh, Bl } = { Bh: Bh ^ Ch, Bl: Bl ^ Cl });
  37. ({ Bh, Bl } = { Bh: u64.rotrSH(Bh, Bl, 24), Bl: u64.rotrSL(Bh, Bl, 24) });
  38. (BBUF[2 * a] = Al), (BBUF[2 * a + 1] = Ah);
  39. (BBUF[2 * b] = Bl), (BBUF[2 * b + 1] = Bh);
  40. (BBUF[2 * c] = Cl), (BBUF[2 * c + 1] = Ch);
  41. (BBUF[2 * d] = Dl), (BBUF[2 * d + 1] = Dh);
  42. }
  43. function G2b(a, b, c, d, msg, x) {
  44. // NOTE: V is LE here
  45. const Xl = msg[x], Xh = msg[x + 1]; // prettier-ignore
  46. let Al = BBUF[2 * a], Ah = BBUF[2 * a + 1]; // prettier-ignore
  47. let Bl = BBUF[2 * b], Bh = BBUF[2 * b + 1]; // prettier-ignore
  48. let Cl = BBUF[2 * c], Ch = BBUF[2 * c + 1]; // prettier-ignore
  49. let Dl = BBUF[2 * d], Dh = BBUF[2 * d + 1]; // prettier-ignore
  50. // v[a] = (v[a] + v[b] + x) | 0;
  51. let ll = u64.add3L(Al, Bl, Xl);
  52. Ah = u64.add3H(ll, Ah, Bh, Xh);
  53. Al = ll | 0;
  54. // v[d] = rotr(v[d] ^ v[a], 16)
  55. ({ Dh, Dl } = { Dh: Dh ^ Ah, Dl: Dl ^ Al });
  56. ({ Dh, Dl } = { Dh: u64.rotrSH(Dh, Dl, 16), Dl: u64.rotrSL(Dh, Dl, 16) });
  57. // v[c] = (v[c] + v[d]) | 0;
  58. ({ h: Ch, l: Cl } = u64.add(Ch, Cl, Dh, Dl));
  59. // v[b] = rotr(v[b] ^ v[c], 63)
  60. ({ Bh, Bl } = { Bh: Bh ^ Ch, Bl: Bl ^ Cl });
  61. ({ Bh, Bl } = { Bh: u64.rotrBH(Bh, Bl, 63), Bl: u64.rotrBL(Bh, Bl, 63) });
  62. (BBUF[2 * a] = Al), (BBUF[2 * a + 1] = Ah);
  63. (BBUF[2 * b] = Bl), (BBUF[2 * b + 1] = Bh);
  64. (BBUF[2 * c] = Cl), (BBUF[2 * c + 1] = Ch);
  65. (BBUF[2 * d] = Dl), (BBUF[2 * d + 1] = Dh);
  66. }
  67. function checkBlake2Opts(outputLen, opts = {}, keyLen, saltLen, persLen) {
  68. anumber(keyLen);
  69. if (outputLen < 0 || outputLen > keyLen)
  70. throw new Error('outputLen bigger than keyLen');
  71. const { key, salt, personalization } = opts;
  72. if (key !== undefined && (key.length < 1 || key.length > keyLen))
  73. throw new Error('key length must be undefined or 1..' + keyLen);
  74. if (salt !== undefined && salt.length !== saltLen)
  75. throw new Error('salt must be undefined or ' + saltLen);
  76. if (personalization !== undefined && personalization.length !== persLen)
  77. throw new Error('personalization must be undefined or ' + persLen);
  78. }
  79. /** Class, from which others are subclassed. */
  80. export class BLAKE2 extends Hash {
  81. constructor(blockLen, outputLen) {
  82. super();
  83. this.finished = false;
  84. this.destroyed = false;
  85. this.length = 0;
  86. this.pos = 0;
  87. anumber(blockLen);
  88. anumber(outputLen);
  89. this.blockLen = blockLen;
  90. this.outputLen = outputLen;
  91. this.buffer = new Uint8Array(blockLen);
  92. this.buffer32 = u32(this.buffer);
  93. }
  94. update(data) {
  95. aexists(this);
  96. data = toBytes(data);
  97. abytes(data);
  98. // Main difference with other hashes: there is flag for last block,
  99. // so we cannot process current block before we know that there
  100. // is the next one. This significantly complicates logic and reduces ability
  101. // to do zero-copy processing
  102. const { blockLen, buffer, buffer32 } = this;
  103. const len = data.length;
  104. const offset = data.byteOffset;
  105. const buf = data.buffer;
  106. for (let pos = 0; pos < len;) {
  107. // If buffer is full and we still have input (don't process last block, same as blake2s)
  108. if (this.pos === blockLen) {
  109. swap32IfBE(buffer32);
  110. this.compress(buffer32, 0, false);
  111. swap32IfBE(buffer32);
  112. this.pos = 0;
  113. }
  114. const take = Math.min(blockLen - this.pos, len - pos);
  115. const dataOffset = offset + pos;
  116. // full block && aligned to 4 bytes && not last in input
  117. if (take === blockLen && !(dataOffset % 4) && pos + take < len) {
  118. const data32 = new Uint32Array(buf, dataOffset, Math.floor((len - pos) / 4));
  119. swap32IfBE(data32);
  120. for (let pos32 = 0; pos + blockLen < len; pos32 += buffer32.length, pos += blockLen) {
  121. this.length += blockLen;
  122. this.compress(data32, pos32, false);
  123. }
  124. swap32IfBE(data32);
  125. continue;
  126. }
  127. buffer.set(data.subarray(pos, pos + take), this.pos);
  128. this.pos += take;
  129. this.length += take;
  130. pos += take;
  131. }
  132. return this;
  133. }
  134. digestInto(out) {
  135. aexists(this);
  136. aoutput(out, this);
  137. const { pos, buffer32 } = this;
  138. this.finished = true;
  139. // Padding
  140. clean(this.buffer.subarray(pos));
  141. swap32IfBE(buffer32);
  142. this.compress(buffer32, 0, true);
  143. swap32IfBE(buffer32);
  144. const out32 = u32(out);
  145. this.get().forEach((v, i) => (out32[i] = swap8IfBE(v)));
  146. }
  147. digest() {
  148. const { buffer, outputLen } = this;
  149. this.digestInto(buffer);
  150. const res = buffer.slice(0, outputLen);
  151. this.destroy();
  152. return res;
  153. }
  154. _cloneInto(to) {
  155. const { buffer, length, finished, destroyed, outputLen, pos } = this;
  156. to || (to = new this.constructor({ dkLen: outputLen }));
  157. to.set(...this.get());
  158. to.buffer.set(buffer);
  159. to.destroyed = destroyed;
  160. to.finished = finished;
  161. to.length = length;
  162. to.pos = pos;
  163. // @ts-ignore
  164. to.outputLen = outputLen;
  165. return to;
  166. }
  167. clone() {
  168. return this._cloneInto();
  169. }
  170. }
  171. export class BLAKE2b extends BLAKE2 {
  172. constructor(opts = {}) {
  173. const olen = opts.dkLen === undefined ? 64 : opts.dkLen;
  174. super(128, olen);
  175. // Same as SHA-512, but LE
  176. this.v0l = B2B_IV[0] | 0;
  177. this.v0h = B2B_IV[1] | 0;
  178. this.v1l = B2B_IV[2] | 0;
  179. this.v1h = B2B_IV[3] | 0;
  180. this.v2l = B2B_IV[4] | 0;
  181. this.v2h = B2B_IV[5] | 0;
  182. this.v3l = B2B_IV[6] | 0;
  183. this.v3h = B2B_IV[7] | 0;
  184. this.v4l = B2B_IV[8] | 0;
  185. this.v4h = B2B_IV[9] | 0;
  186. this.v5l = B2B_IV[10] | 0;
  187. this.v5h = B2B_IV[11] | 0;
  188. this.v6l = B2B_IV[12] | 0;
  189. this.v6h = B2B_IV[13] | 0;
  190. this.v7l = B2B_IV[14] | 0;
  191. this.v7h = B2B_IV[15] | 0;
  192. checkBlake2Opts(olen, opts, 64, 16, 16);
  193. let { key, personalization, salt } = opts;
  194. let keyLength = 0;
  195. if (key !== undefined) {
  196. key = toBytes(key);
  197. keyLength = key.length;
  198. }
  199. this.v0l ^= this.outputLen | (keyLength << 8) | (0x01 << 16) | (0x01 << 24);
  200. if (salt !== undefined) {
  201. salt = toBytes(salt);
  202. const slt = u32(salt);
  203. this.v4l ^= swap8IfBE(slt[0]);
  204. this.v4h ^= swap8IfBE(slt[1]);
  205. this.v5l ^= swap8IfBE(slt[2]);
  206. this.v5h ^= swap8IfBE(slt[3]);
  207. }
  208. if (personalization !== undefined) {
  209. personalization = toBytes(personalization);
  210. const pers = u32(personalization);
  211. this.v6l ^= swap8IfBE(pers[0]);
  212. this.v6h ^= swap8IfBE(pers[1]);
  213. this.v7l ^= swap8IfBE(pers[2]);
  214. this.v7h ^= swap8IfBE(pers[3]);
  215. }
  216. if (key !== undefined) {
  217. // Pad to blockLen and update
  218. const tmp = new Uint8Array(this.blockLen);
  219. tmp.set(key);
  220. this.update(tmp);
  221. }
  222. }
  223. // prettier-ignore
  224. get() {
  225. let { v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h } = this;
  226. return [v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h];
  227. }
  228. // prettier-ignore
  229. set(v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h) {
  230. this.v0l = v0l | 0;
  231. this.v0h = v0h | 0;
  232. this.v1l = v1l | 0;
  233. this.v1h = v1h | 0;
  234. this.v2l = v2l | 0;
  235. this.v2h = v2h | 0;
  236. this.v3l = v3l | 0;
  237. this.v3h = v3h | 0;
  238. this.v4l = v4l | 0;
  239. this.v4h = v4h | 0;
  240. this.v5l = v5l | 0;
  241. this.v5h = v5h | 0;
  242. this.v6l = v6l | 0;
  243. this.v6h = v6h | 0;
  244. this.v7l = v7l | 0;
  245. this.v7h = v7h | 0;
  246. }
  247. compress(msg, offset, isLast) {
  248. this.get().forEach((v, i) => (BBUF[i] = v)); // First half from state.
  249. BBUF.set(B2B_IV, 16); // Second half from IV.
  250. let { h, l } = u64.fromBig(BigInt(this.length));
  251. BBUF[24] = B2B_IV[8] ^ l; // Low word of the offset.
  252. BBUF[25] = B2B_IV[9] ^ h; // High word.
  253. // Invert all bits for last block
  254. if (isLast) {
  255. BBUF[28] = ~BBUF[28];
  256. BBUF[29] = ~BBUF[29];
  257. }
  258. let j = 0;
  259. const s = BSIGMA;
  260. for (let i = 0; i < 12; i++) {
  261. G1b(0, 4, 8, 12, msg, offset + 2 * s[j++]);
  262. G2b(0, 4, 8, 12, msg, offset + 2 * s[j++]);
  263. G1b(1, 5, 9, 13, msg, offset + 2 * s[j++]);
  264. G2b(1, 5, 9, 13, msg, offset + 2 * s[j++]);
  265. G1b(2, 6, 10, 14, msg, offset + 2 * s[j++]);
  266. G2b(2, 6, 10, 14, msg, offset + 2 * s[j++]);
  267. G1b(3, 7, 11, 15, msg, offset + 2 * s[j++]);
  268. G2b(3, 7, 11, 15, msg, offset + 2 * s[j++]);
  269. G1b(0, 5, 10, 15, msg, offset + 2 * s[j++]);
  270. G2b(0, 5, 10, 15, msg, offset + 2 * s[j++]);
  271. G1b(1, 6, 11, 12, msg, offset + 2 * s[j++]);
  272. G2b(1, 6, 11, 12, msg, offset + 2 * s[j++]);
  273. G1b(2, 7, 8, 13, msg, offset + 2 * s[j++]);
  274. G2b(2, 7, 8, 13, msg, offset + 2 * s[j++]);
  275. G1b(3, 4, 9, 14, msg, offset + 2 * s[j++]);
  276. G2b(3, 4, 9, 14, msg, offset + 2 * s[j++]);
  277. }
  278. this.v0l ^= BBUF[0] ^ BBUF[16];
  279. this.v0h ^= BBUF[1] ^ BBUF[17];
  280. this.v1l ^= BBUF[2] ^ BBUF[18];
  281. this.v1h ^= BBUF[3] ^ BBUF[19];
  282. this.v2l ^= BBUF[4] ^ BBUF[20];
  283. this.v2h ^= BBUF[5] ^ BBUF[21];
  284. this.v3l ^= BBUF[6] ^ BBUF[22];
  285. this.v3h ^= BBUF[7] ^ BBUF[23];
  286. this.v4l ^= BBUF[8] ^ BBUF[24];
  287. this.v4h ^= BBUF[9] ^ BBUF[25];
  288. this.v5l ^= BBUF[10] ^ BBUF[26];
  289. this.v5h ^= BBUF[11] ^ BBUF[27];
  290. this.v6l ^= BBUF[12] ^ BBUF[28];
  291. this.v6h ^= BBUF[13] ^ BBUF[29];
  292. this.v7l ^= BBUF[14] ^ BBUF[30];
  293. this.v7h ^= BBUF[15] ^ BBUF[31];
  294. clean(BBUF);
  295. }
  296. destroy() {
  297. this.destroyed = true;
  298. clean(this.buffer32);
  299. this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  300. }
  301. }
  302. /**
  303. * Blake2b hash function. 64-bit. 1.5x slower than blake2s in JS.
  304. * @param msg - message that would be hashed
  305. * @param opts - dkLen output length, key for MAC mode, salt, personalization
  306. */
  307. export const blake2b = /* @__PURE__ */ createOptHasher((opts) => new BLAKE2b(opts));
  308. // prettier-ignore
  309. export function compress(s, offset, msg, rounds, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) {
  310. let j = 0;
  311. for (let i = 0; i < rounds; i++) {
  312. ({ a: v0, b: v4, c: v8, d: v12 } = G1s(v0, v4, v8, v12, msg[offset + s[j++]]));
  313. ({ a: v0, b: v4, c: v8, d: v12 } = G2s(v0, v4, v8, v12, msg[offset + s[j++]]));
  314. ({ a: v1, b: v5, c: v9, d: v13 } = G1s(v1, v5, v9, v13, msg[offset + s[j++]]));
  315. ({ a: v1, b: v5, c: v9, d: v13 } = G2s(v1, v5, v9, v13, msg[offset + s[j++]]));
  316. ({ a: v2, b: v6, c: v10, d: v14 } = G1s(v2, v6, v10, v14, msg[offset + s[j++]]));
  317. ({ a: v2, b: v6, c: v10, d: v14 } = G2s(v2, v6, v10, v14, msg[offset + s[j++]]));
  318. ({ a: v3, b: v7, c: v11, d: v15 } = G1s(v3, v7, v11, v15, msg[offset + s[j++]]));
  319. ({ a: v3, b: v7, c: v11, d: v15 } = G2s(v3, v7, v11, v15, msg[offset + s[j++]]));
  320. ({ a: v0, b: v5, c: v10, d: v15 } = G1s(v0, v5, v10, v15, msg[offset + s[j++]]));
  321. ({ a: v0, b: v5, c: v10, d: v15 } = G2s(v0, v5, v10, v15, msg[offset + s[j++]]));
  322. ({ a: v1, b: v6, c: v11, d: v12 } = G1s(v1, v6, v11, v12, msg[offset + s[j++]]));
  323. ({ a: v1, b: v6, c: v11, d: v12 } = G2s(v1, v6, v11, v12, msg[offset + s[j++]]));
  324. ({ a: v2, b: v7, c: v8, d: v13 } = G1s(v2, v7, v8, v13, msg[offset + s[j++]]));
  325. ({ a: v2, b: v7, c: v8, d: v13 } = G2s(v2, v7, v8, v13, msg[offset + s[j++]]));
  326. ({ a: v3, b: v4, c: v9, d: v14 } = G1s(v3, v4, v9, v14, msg[offset + s[j++]]));
  327. ({ a: v3, b: v4, c: v9, d: v14 } = G2s(v3, v4, v9, v14, msg[offset + s[j++]]));
  328. }
  329. return { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 };
  330. }
  331. const B2S_IV = SHA256_IV;
  332. export class BLAKE2s extends BLAKE2 {
  333. constructor(opts = {}) {
  334. const olen = opts.dkLen === undefined ? 32 : opts.dkLen;
  335. super(64, olen);
  336. // Internal state, same as SHA-256
  337. this.v0 = B2S_IV[0] | 0;
  338. this.v1 = B2S_IV[1] | 0;
  339. this.v2 = B2S_IV[2] | 0;
  340. this.v3 = B2S_IV[3] | 0;
  341. this.v4 = B2S_IV[4] | 0;
  342. this.v5 = B2S_IV[5] | 0;
  343. this.v6 = B2S_IV[6] | 0;
  344. this.v7 = B2S_IV[7] | 0;
  345. checkBlake2Opts(olen, opts, 32, 8, 8);
  346. let { key, personalization, salt } = opts;
  347. let keyLength = 0;
  348. if (key !== undefined) {
  349. key = toBytes(key);
  350. keyLength = key.length;
  351. }
  352. this.v0 ^= this.outputLen | (keyLength << 8) | (0x01 << 16) | (0x01 << 24);
  353. if (salt !== undefined) {
  354. salt = toBytes(salt);
  355. const slt = u32(salt);
  356. this.v4 ^= swap8IfBE(slt[0]);
  357. this.v5 ^= swap8IfBE(slt[1]);
  358. }
  359. if (personalization !== undefined) {
  360. personalization = toBytes(personalization);
  361. const pers = u32(personalization);
  362. this.v6 ^= swap8IfBE(pers[0]);
  363. this.v7 ^= swap8IfBE(pers[1]);
  364. }
  365. if (key !== undefined) {
  366. // Pad to blockLen and update
  367. abytes(key);
  368. const tmp = new Uint8Array(this.blockLen);
  369. tmp.set(key);
  370. this.update(tmp);
  371. }
  372. }
  373. get() {
  374. const { v0, v1, v2, v3, v4, v5, v6, v7 } = this;
  375. return [v0, v1, v2, v3, v4, v5, v6, v7];
  376. }
  377. // prettier-ignore
  378. set(v0, v1, v2, v3, v4, v5, v6, v7) {
  379. this.v0 = v0 | 0;
  380. this.v1 = v1 | 0;
  381. this.v2 = v2 | 0;
  382. this.v3 = v3 | 0;
  383. this.v4 = v4 | 0;
  384. this.v5 = v5 | 0;
  385. this.v6 = v6 | 0;
  386. this.v7 = v7 | 0;
  387. }
  388. compress(msg, offset, isLast) {
  389. const { h, l } = u64.fromBig(BigInt(this.length));
  390. // prettier-ignore
  391. const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } = compress(BSIGMA, offset, msg, 10, this.v0, this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, B2S_IV[0], B2S_IV[1], B2S_IV[2], B2S_IV[3], l ^ B2S_IV[4], h ^ B2S_IV[5], isLast ? ~B2S_IV[6] : B2S_IV[6], B2S_IV[7]);
  392. this.v0 ^= v0 ^ v8;
  393. this.v1 ^= v1 ^ v9;
  394. this.v2 ^= v2 ^ v10;
  395. this.v3 ^= v3 ^ v11;
  396. this.v4 ^= v4 ^ v12;
  397. this.v5 ^= v5 ^ v13;
  398. this.v6 ^= v6 ^ v14;
  399. this.v7 ^= v7 ^ v15;
  400. }
  401. destroy() {
  402. this.destroyed = true;
  403. clean(this.buffer32);
  404. this.set(0, 0, 0, 0, 0, 0, 0, 0);
  405. }
  406. }
  407. /**
  408. * Blake2s hash function. Focuses on 8-bit to 32-bit platforms. 1.5x faster than blake2b in JS.
  409. * @param msg - message that would be hashed
  410. * @param opts - dkLen output length, key for MAC mode, salt, personalization
  411. */
  412. export const blake2s = /* @__PURE__ */ createOptHasher((opts) => new BLAKE2s(opts));
  413. //# sourceMappingURL=blake2.js.map