@dxos/crypto 2.33.8-dev.8609bc45 → 2.33.9-dev.e605934d

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.
@@ -1,6 +1,5 @@
1
1
  export * from './encrypt';
2
2
  export * from './hash';
3
- export * from './human-hash';
4
3
  export * from './keys';
5
4
  export * from './validator';
6
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
package/dist/src/index.js CHANGED
@@ -19,7 +19,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  __exportStar(require("./encrypt"), exports);
21
21
  __exportStar(require("./hash"), exports);
22
- __exportStar(require("./human-hash"), exports);
23
22
  __exportStar(require("./keys"), exports);
24
23
  __exportStar(require("./validator"), exports);
25
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,4CAA0B;AAC1B,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAuB;AACvB,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,4CAA0B;AAC1B,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B"}
@@ -1,9 +1,5 @@
1
1
  /// <reference types="node" />
2
2
  import { PublicKeyLike } from '@dxos/protocols';
3
- import { HumanHasher } from './human-hash';
4
- export declare const hasher: HumanHasher;
5
- export declare const PUBLIC_KEY_LENGTH = 32;
6
- export declare const SECRET_KEY_LENGTH = 64;
7
3
  export declare const SIGNATURE_LENGTH = 64;
8
4
  export declare const zeroKey: () => Uint8Array;
9
5
  export interface KeyPair {
@@ -12,17 +8,6 @@ export interface KeyPair {
12
8
  }
13
9
  export declare const createKeyPair: (seed?: Buffer) => KeyPair;
14
10
  export declare const discoveryKey: (key: PublicKeyLike) => Buffer;
15
- /**
16
- * @param {string} str - Hex string representation of key.
17
- * @return {Buffer} Key buffer.
18
- */
19
- export declare const keyToBuffer: (str: string) => Buffer;
20
- /**
21
- * @param {Buffer | Uint8Array} buffer - Key buffer.
22
- * @return {string} Hex string representation of key.
23
- */
24
- export declare const keyToString: (buffer: PublicKeyLike) => string;
25
- export declare const humanize: (value: PublicKeyLike) => string;
26
11
  /**
27
12
  * Return random bytes of length.
28
13
  * @param [length=32]
@@ -1 +1 @@
1
- {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/keys.ts"],"names":[],"mappings":";AAOA,OAAO,EAAa,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,eAAO,MAAM,MAAM,aAAoB,CAAC;AAExC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,eAAO,MAAM,OAAO,kBAA2B,CAAC;AAOhD,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,aAAa,UAAW,MAAM,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,MAAM,aAAa,MAAM,KAAG,OAM9E,CAAC"}
package/dist/src/keys.js CHANGED
@@ -6,14 +6,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  return (mod && mod.__esModule) ? mod : { "default": mod };
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.verify = exports.sign = exports.createId = exports.randomBytes = exports.humanize = exports.keyToString = exports.keyToBuffer = exports.discoveryKey = exports.createKeyPair = exports.zeroKey = exports.SIGNATURE_LENGTH = exports.SECRET_KEY_LENGTH = exports.PUBLIC_KEY_LENGTH = exports.hasher = void 0;
9
+ exports.verify = exports.sign = exports.createId = exports.randomBytes = exports.discoveryKey = exports.createKeyPair = exports.zeroKey = exports.SIGNATURE_LENGTH = void 0;
10
10
  const assert_1 = __importDefault(require("assert"));
11
11
  const hypercore_crypto_1 = __importDefault(require("hypercore-crypto"));
12
12
  const protocols_1 = require("@dxos/protocols");
13
- const human_hash_1 = require("./human-hash");
14
- exports.hasher = new human_hash_1.HumanHasher();
15
- exports.PUBLIC_KEY_LENGTH = 32; // TODO(wittjosiah): Move to protocols with PublicKey?
16
- exports.SECRET_KEY_LENGTH = 64;
17
13
  exports.SIGNATURE_LENGTH = 64;
18
14
  const zeroKey = () => new Uint8Array(32);
19
15
  exports.zeroKey = zeroKey;
@@ -27,39 +23,6 @@ const createKeyPair = (seed) => {
27
23
  exports.createKeyPair = createKeyPair;
28
24
  const discoveryKey = (key) => hypercore_crypto_1.default.discoveryKey(protocols_1.PublicKey.from(key).asBuffer());
29
25
  exports.discoveryKey = discoveryKey;
30
- /**
31
- * @param {string} str - Hex string representation of key.
32
- * @return {Buffer} Key buffer.
33
- */
34
- const keyToBuffer = (str) => {
35
- (0, assert_1.default)(typeof str === 'string', 'Invalid type');
36
- const buffer = Buffer.from(str, 'hex');
37
- (0, assert_1.default)(buffer.length === exports.PUBLIC_KEY_LENGTH || buffer.length === exports.SECRET_KEY_LENGTH, `Invalid key length: ${buffer.length}`);
38
- return buffer;
39
- };
40
- exports.keyToBuffer = keyToBuffer;
41
- /**
42
- * @param {Buffer | Uint8Array} buffer - Key buffer.
43
- * @return {string} Hex string representation of key.
44
- */
45
- const keyToString = (buffer) => {
46
- if (buffer instanceof protocols_1.PublicKey) {
47
- buffer = buffer.asBuffer();
48
- }
49
- else if (buffer instanceof Uint8Array) {
50
- buffer = Buffer.from(buffer);
51
- }
52
- (0, assert_1.default)(buffer instanceof Buffer, 'Invalid type');
53
- return buffer.toString('hex');
54
- };
55
- exports.keyToString = keyToString;
56
- const humanize = (value) => {
57
- if (value instanceof protocols_1.PublicKey || value instanceof Buffer || value instanceof Uint8Array) {
58
- value = (0, exports.keyToString)(value);
59
- }
60
- return exports.hasher.humanize(value);
61
- };
62
- exports.humanize = humanize;
63
26
  /**
64
27
  * Return random bytes of length.
65
28
  * @param [length=32]
@@ -70,7 +33,8 @@ exports.randomBytes = randomBytes;
70
33
  /**
71
34
  * @return {string}
72
35
  */
73
- const createId = () => (0, exports.keyToString)((0, exports.randomBytes)(32));
36
+ // TODO(wittjosiah): This probably shouldn't rely on PublicKey?
37
+ const createId = () => protocols_1.PublicKey.stringify((0, exports.randomBytes)(32));
74
38
  exports.createId = createId;
75
39
  /**
76
40
  * Sign the contents of message with secretKey
@@ -80,7 +44,7 @@ exports.createId = createId;
80
44
  */
81
45
  const sign = (message, secretKey) => {
82
46
  (0, assert_1.default)(Buffer.isBuffer(message));
83
- (0, assert_1.default)(Buffer.isBuffer(secretKey) && secretKey.length === exports.SECRET_KEY_LENGTH);
47
+ (0, assert_1.default)(Buffer.isBuffer(secretKey) && secretKey.length === protocols_1.SECRET_KEY_LENGTH);
84
48
  return hypercore_crypto_1.default.sign(message, secretKey);
85
49
  };
86
50
  exports.sign = sign;
@@ -94,7 +58,7 @@ exports.sign = sign;
94
58
  const verify = (message, signature, publicKey) => {
95
59
  (0, assert_1.default)(Buffer.isBuffer(message));
96
60
  (0, assert_1.default)(Buffer.isBuffer(signature) && signature.length === exports.SIGNATURE_LENGTH);
97
- (0, assert_1.default)(Buffer.isBuffer(publicKey) && publicKey.length === exports.PUBLIC_KEY_LENGTH);
61
+ (0, assert_1.default)(Buffer.isBuffer(publicKey) && publicKey.length === protocols_1.PUBLIC_KEY_LENGTH);
98
62
  return hypercore_crypto_1.default.verify(message, signature, publicKey);
99
63
  };
100
64
  exports.verify = verify;
@@ -1 +1 @@
1
- {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/keys.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAC5B,wEAAsC;AAEtC,+CAA2D;AAE3D,6CAA2C;AAE9B,QAAA,MAAM,GAAG,IAAI,wBAAW,EAAE,CAAC;AAE3B,QAAA,iBAAiB,GAAG,EAAE,CAAC,CAAC,sDAAsD;AAC9E,QAAA,iBAAiB,GAAG,EAAE,CAAC;AACvB,QAAA,gBAAgB,GAAG,EAAE,CAAC;AAE5B,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AAAnC,QAAA,OAAO,WAA4B;AAYzC,MAAM,aAAa,GAAG,CAAC,IAAa,EAAW,EAAE;IACtD,IAAI,IAAI,EAAE;QACR,IAAA,gBAAM,EAAC,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,8CAA8C,CAAC,CAAC;QAC1E,OAAO,0BAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;KAC1C;IACD,OAAO,0BAAM,CAAC,OAAO,EAAE,CAAC;AAC1B,CAAC,CAAC;AANW,QAAA,aAAa,iBAMxB;AAEK,MAAM,YAAY,GAAG,CAAC,GAAkB,EAAU,EAAE,CAAC,0BAAM,CAAC,YAAY,CAAC,qBAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAAnG,QAAA,YAAY,gBAAuF;AAEhH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AAI,SAAS,CAAC,MAAM,KAAK,6BAAiB,CAAC,CAAC;IAE7E,OAAO,0BAAM,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACzC,CAAC,CAAC;AALW,QAAA,IAAI,QAKf;AAEF;;;;;;GAMG;AACI,MAAM,MAAM,GAAG,CAAC,OAAe,EAAE,SAAiB,EAAE,SAAiB,EAAW,EAAE;IACvF,IAAA,gBAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IACjC,IAAA,gBAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,KAAK,wBAAgB,CAAC,CAAC;IAC5E,IAAA,gBAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,KAAK,6BAAiB,CAAC,CAAC;IAE7E,OAAO,0BAAM,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACtD,CAAC,CAAC;AANW,QAAA,MAAM,UAMjB"}
@@ -5,18 +5,7 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  // DXOS testing browser.
7
7
  const keys_1 = require("./keys");
8
- test('Basic key operations', () => {
9
- const { publicKey } = (0, keys_1.createKeyPair)();
10
- expect((0, keys_1.keyToBuffer)((0, keys_1.keyToString)(publicKey))).toEqual(publicKey);
11
- expect(() => (0, keys_1.keyToString)('not-a-buffer')).toThrowError();
12
- expect(() => (0, keys_1.keyToBuffer)('not-a-value-hex-key')).toThrowError();
13
- expect(() => (0, keys_1.keyToBuffer)(publicKey)).toThrowError();
14
- });
15
- test('Hashing', () => {
16
- const { publicKey, secretKey } = (0, keys_1.createKeyPair)();
8
+ test('Create id is unique', () => {
17
9
  expect((0, keys_1.createId)()).not.toEqual((0, keys_1.createId)());
18
- expect((0, keys_1.humanize)(publicKey)).not.toEqual((0, keys_1.humanize)(secretKey));
19
- expect((0, keys_1.humanize)(publicKey)).toEqual(keys_1.hasher.humanize((0, keys_1.keyToString)(publicKey)));
20
- expect(keys_1.hasher.humanize((0, keys_1.createId)())).toBeDefined();
21
10
  });
22
11
  //# sourceMappingURL=keys.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"keys.test.js","sourceRoot":"","sources":["../../src/keys.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,wBAAwB;AAExB,iCAA6F;AAE7F,IAAI,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAChC,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,oBAAa,GAAE,CAAC;IAEtC,MAAM,CAAC,IAAA,kBAAW,EAAC,IAAA,kBAAW,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAE/D,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,kBAAW,EAAC,cAAqB,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;IAChE,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,kBAAW,EAAC,qBAAqB,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;IAChE,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,kBAAW,EAAC,SAAgB,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;AAC7D,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE;IACnB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAA,oBAAa,GAAE,CAAC;IAEjD,MAAM,CAAC,IAAA,eAAQ,GAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAA,eAAQ,GAAE,CAAC,CAAC;IAE3C,MAAM,CAAC,IAAA,eAAQ,EAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAA,eAAQ,EAAC,SAAS,CAAC,CAAC,CAAC;IAC7D,MAAM,CAAC,IAAA,eAAQ,EAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,aAAM,CAAC,QAAQ,CAAC,IAAA,kBAAW,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC7E,MAAM,CAAC,aAAM,CAAC,QAAQ,CAAC,IAAA,eAAQ,GAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACpD,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"keys.test.js","sourceRoot":"","sources":["../../src/keys.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,wBAAwB;AAExB,iCAAkC;AAElC,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE;IAC/B,MAAM,CAAC,IAAA,eAAQ,GAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAA,eAAQ,GAAE,CAAC,CAAC;AAC7C,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/validator.ts"],"names":[],"mappings":";AAQA;;;GAGG;AACH,eAAO,MAAM,qBAAqB,cACpB,MAAM,eAAe,MAAM,aAAa,MAAM,QAAuD,CAAC"}
1
+ {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/validator.ts"],"names":[],"mappings":";AAQA;;;GAGG;AACH,eAAO,MAAM,qBAAqB,cACpB,MAAM,eAAe,MAAM,aAAa,MAAM,QAA+D,CAAC"}
@@ -5,11 +5,11 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getSignatureValidator = void 0;
7
7
  const hypercore_crypto_1 = require("hypercore-crypto");
8
- const keys_1 = require("./keys");
8
+ const protocols_1 = require("@dxos/protocols");
9
9
  /**
10
10
  * Generator for signature validation function.
11
11
  * @param {String} publicKey
12
12
  */
13
- const getSignatureValidator = (publicKey) => (message, signature) => (0, hypercore_crypto_1.verify)(message, signature, (0, keys_1.keyToBuffer)(publicKey));
13
+ const getSignatureValidator = (publicKey) => (message, signature) => (0, hypercore_crypto_1.verify)(message, signature, protocols_1.PublicKey.bufferize(publicKey));
14
14
  exports.getSignatureValidator = getSignatureValidator;
15
15
  //# sourceMappingURL=validator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/validator.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,uDAA0C;AAE1C,iCAAqC;AAErC;;;GAGG;AACI,MAAM,qBAAqB,GAChC,CAAC,SAAiB,EAAE,EAAE,CAAC,CAAC,OAAe,EAAE,SAAiB,EAAE,EAAE,CAAC,IAAA,yBAAM,EAAC,OAAO,EAAE,SAAS,EAAE,IAAA,kBAAW,EAAC,SAAS,CAAC,CAAC,CAAC;AADvG,QAAA,qBAAqB,yBACkF"}
1
+ {"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/validator.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,uDAA0C;AAE1C,+CAA4C;AAE5C;;;GAGG;AACI,MAAM,qBAAqB,GAChC,CAAC,SAAiB,EAAE,EAAE,CAAC,CAAC,OAAe,EAAE,SAAiB,EAAE,EAAE,CAAC,IAAA,yBAAM,EAAC,OAAO,EAAE,SAAS,EAAE,qBAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAD/G,QAAA,qBAAqB,yBAC0F"}
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es5.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+crypto-js@4.0.2/node_modules/@types/crypto-js/index.d.ts","../src/encrypt.ts","../src/encrypt.test.ts","../src/hash.ts","../src/hash.test.ts","../src/human-hash.ts","../../protocols/dist/src/proto/gen/google/protobuf.d.ts","../../protocols/dist/src/proto/gen/dxos/credentials.d.ts","../../protocols/dist/src/proto/gen/dxos/halo/keys.d.ts","../../protocols/dist/src/proto/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert/strict.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/async_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/buffer.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/child_process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/cluster.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/console.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/constants.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/crypto.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dgram.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/diagnostics_channel.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/domain.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http2.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/https.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/inspector.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/module.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/net.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/os.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/path.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/perf_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/punycode.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/querystring.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/readline.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/repl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/consumers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/web.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/string_decoder.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tls.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/trace_events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tty.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/url.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/v8.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/vm.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/wasi.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/worker_threads.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/zlib.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.global.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/index.d.ts","../../protocols/dist/src/public-key.d.ts","../../protocols/dist/src/index.d.ts","../src/keys.ts","../src/validator.ts","../src/index.ts","../src/keys.test.ts","../src/shims.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/diffLines.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/printDiffs.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+jest@26.0.24/node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","3eb679a56cab01203a1ba7edeade937f6a2a4c718513b2cd930b579807fa9359","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},{"version":"070fafc332546049324c5eb0559b40974f700aa78eee7a12d1486035baa39558","affectsGlobalScope":true},{"version":"eb5714694231b2e20c388bbb7dfa862780a458a07cd87b2737e6be1f6169a8ad","signature":"371f32dc57397d7fa8a5b8680e3fbb4415acab6ffe15a08d26ee856593ccf3f7"},{"version":"528215f3eec43ecbb2420cfde8d88672328129643a1586a13d86d5e80c415110","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"1127d47e6d5d89262545d064ee90a5ccef53a80f4d81eedb3221251198ec366f","signature":"4013fc0cdc2ba4c291ba160fd6204c796d0ca7dad35ea719ec9c4d00ec21305e"},{"version":"e747a4ae9c8bed522f9c9c7738775ac50455ab182f09f70498e5a7ab1260a8aa","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"89489068d5fd52b2c9fb36801606a056f5e09d525ddf0f637e3df5f433da3168","signature":"ede1f891817b1a038aef58251be9a5c1981c9aac102d9ea1b483b6abed64437f"},"011267fade3e4c99b36a9d3d14734461309de6a989f5b27ac7ac98123083e31f","3134f52cda99065c8630aa4552c7509923f76af422bb5643b3bf49bfbbd0894c","7dab91e9b6f9cb074893138261f91345371bbf053099253bc47ccdc722388da3","58ada477113e6a47d967c034a83392adfcaad478688e6916a471919d8798ff53","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","c665d5c50c2573aefd98f0ffb12c5583e333ed94294ce6f144a4163a8c84f09b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"8a215750db3e2073511e07c9e293c8c40d6109e5c7368845e060bcc12adbae6f","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","0c45729ee48934bd4c5f7d2db2c93c26855bd60ddb9ed2e6b50eea540d10874a","e8ba6acb214115658895eddc9eb583d7e3ce74619b50a26bafeeb0496e08cdfd",{"version":"10c5a1fa6da1364955513ce9f41f377c0aefa32e0e29ee1920ff90137cce32ce","signature":"886cf8080ccf1b88f6756ee7adb6135ae019846fa190fc0b5a438d639063a0c3"},{"version":"7dcc90de23c417ea963789112cc023c68f2bcf6a648339dc6baaf40ca648c29d","signature":"29a6655bb4e637e54e67ea8213a53afce35c868c2a22a8ec24ee00db751005b6"},{"version":"b86f00454127f4c98d9050e6f1f0370e7ed668da92bfe7b2f2aacb77d9db6524","signature":"5f0a6c57c7e3e50d414b9dd1502f7400b5427adb96e7de4e44adf1cbedb1e83c"},{"version":"cf0c4790c3404e84670821dfdf727fe1023ff2c9cbe1febf24f0b2a27509ccf8","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"bc6a5524c9b408e1e310ba838b5af3790cb9bdb0d60dd0d8f594ff670e770455","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"516a426e3960379f310107635b8f3a7e8c307c6c665080b128039d9299ec4087","affectsGlobalScope":true}],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":5},"fileIdsList":[[106],[106,125,127],[63,106],[66,106],[67,72,106],[68,78,79,86,95,105,106],[68,69,78,86,106],[70,106],[71,72,79,87,106],[72,95,102,106],[73,75,78,86,106],[74,106],[75,76,106],[77,78,106],[78,106],[78,79,80,95,105,106],[78,79,80,95,106],[81,86,95,105,106],[78,79,81,82,86,95,102,105,106],[81,83,95,102,105,106],[63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],[78,84,106],[85,105,106],[75,78,86,95,106],[87,106],[88,106],[66,89,106],[90,104,106,110],[91,106],[92,106],[78,93,106],[93,94,106,108],[78,95,96,97,106],[95,97,106],[95,96,106],[98,106],[99,106],[78,100,101,106],[100,101,106],[72,86,102,106],[103,106],[86,104,106],[67,81,92,105,106],[72,106],[95,106,107],[106,108],[106,109],[67,72,78,80,89,95,105,106,108,110],[95,106,111],[106,121,122],[106,121,122,123,124],[106,126],[54,106],[53,63,106],[56,106],[54,56,58,106,116,117],[106,116],[58,63,106,115,120],[106,116,120],[62,106,114],[59,61,106],[60,106],[61,106],[106,113],[54,56,58,116,117],[58,115]],"referencedMap":[[53,1],[128,2],[63,3],[64,3],[66,4],[67,5],[68,6],[69,7],[70,8],[71,9],[72,10],[73,11],[74,12],[75,13],[76,13],[77,14],[78,15],[79,16],[80,17],[65,1],[112,1],[81,18],[82,19],[83,20],[113,21],[84,22],[85,23],[86,24],[87,25],[88,26],[89,27],[90,28],[91,29],[92,30],[93,31],[94,32],[95,33],[97,34],[96,35],[98,36],[99,37],[100,38],[101,39],[102,40],[103,41],[104,42],[105,43],[106,44],[107,45],[108,46],[109,47],[110,48],[111,49],[121,1],[123,50],[125,51],[124,50],[122,1],[127,52],[126,1],[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[32,1],[33,1],[34,1],[35,1],[7,1],[36,1],[41,1],[42,1],[37,1],[38,1],[39,1],[40,1],[8,1],[46,1],[43,1],[44,1],[45,1],[47,1],[9,1],[48,1],[49,1],[50,1],[51,1],[1,1],[10,1],[52,1],[55,53],[54,54],[57,55],[56,54],[58,1],[118,56],[119,57],[116,58],[120,1],[117,59],[115,60],[60,61],[61,62],[59,1],[62,63],[114,64]],"exportedModulesMap":[[53,1],[128,2],[63,3],[64,3],[66,4],[67,5],[68,6],[69,7],[70,8],[71,9],[72,10],[73,11],[74,12],[75,13],[76,13],[77,14],[78,15],[79,16],[80,17],[65,1],[112,1],[81,18],[82,19],[83,20],[113,21],[84,22],[85,23],[86,24],[87,25],[88,26],[89,27],[90,28],[91,29],[92,30],[93,31],[94,32],[95,33],[97,34],[96,35],[98,36],[99,37],[100,38],[101,39],[102,40],[103,41],[104,42],[105,43],[106,44],[107,45],[108,46],[109,47],[110,48],[111,49],[121,1],[123,50],[125,51],[124,50],[122,1],[127,52],[126,1],[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[32,1],[33,1],[34,1],[35,1],[7,1],[36,1],[41,1],[42,1],[37,1],[38,1],[39,1],[40,1],[8,1],[46,1],[43,1],[44,1],[45,1],[47,1],[9,1],[48,1],[49,1],[50,1],[51,1],[1,1],[10,1],[52,1],[118,65],[116,66],[120,1],[115,60],[60,61],[61,62],[59,1],[62,63],[114,64]],"semanticDiagnosticsPerFile":[53,128,63,64,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,65,112,81,82,83,113,84,85,86,87,88,89,90,91,92,93,94,95,97,96,98,99,100,101,102,103,104,105,106,107,108,109,110,111,121,123,125,124,122,127,126,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,36,41,42,37,38,39,40,8,46,43,44,45,47,9,48,49,50,51,1,10,52,55,54,57,56,58,118,119,116,120,117,115,60,61,59,62,114]},"version":"4.7.4"}
1
+ {"program":{"fileNames":["../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es5.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+crypto-js@4.0.2/node_modules/@types/crypto-js/index.d.ts","../src/encrypt.ts","../src/encrypt.test.ts","../src/hash.ts","../src/hash.test.ts","../../protocols/dist/src/proto/gen/google/protobuf.d.ts","../../protocols/dist/src/proto/gen/dxos/credentials.d.ts","../../protocols/dist/src/proto/gen/dxos/halo/keys.d.ts","../../protocols/dist/src/proto/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert/strict.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/async_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/buffer.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/child_process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/cluster.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/console.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/constants.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/crypto.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dgram.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/diagnostics_channel.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/domain.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http2.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/https.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/inspector.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/module.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/net.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/os.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/path.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/perf_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/punycode.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/querystring.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/readline.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/repl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/consumers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/web.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/string_decoder.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tls.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/trace_events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tty.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/url.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/v8.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/vm.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/wasi.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/worker_threads.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/zlib.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.global.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/index.d.ts","../../protocols/dist/src/public-key.d.ts","../../protocols/dist/src/timeframe.d.ts","../../protocols/dist/src/index.d.ts","../src/keys.ts","../src/validator.ts","../src/index.ts","../src/keys.test.ts","../src/shims.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/diffLines.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/printDiffs.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+jest@26.0.24/node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","3eb679a56cab01203a1ba7edeade937f6a2a4c718513b2cd930b579807fa9359","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},{"version":"070fafc332546049324c5eb0559b40974f700aa78eee7a12d1486035baa39558","affectsGlobalScope":true},{"version":"eb5714694231b2e20c388bbb7dfa862780a458a07cd87b2737e6be1f6169a8ad","signature":"371f32dc57397d7fa8a5b8680e3fbb4415acab6ffe15a08d26ee856593ccf3f7"},{"version":"528215f3eec43ecbb2420cfde8d88672328129643a1586a13d86d5e80c415110","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"1127d47e6d5d89262545d064ee90a5ccef53a80f4d81eedb3221251198ec366f","signature":"4013fc0cdc2ba4c291ba160fd6204c796d0ca7dad35ea719ec9c4d00ec21305e"},{"version":"e747a4ae9c8bed522f9c9c7738775ac50455ab182f09f70498e5a7ab1260a8aa","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"011267fade3e4c99b36a9d3d14734461309de6a989f5b27ac7ac98123083e31f","3134f52cda99065c8630aa4552c7509923f76af422bb5643b3bf49bfbbd0894c","7dab91e9b6f9cb074893138261f91345371bbf053099253bc47ccdc722388da3","58ada477113e6a47d967c034a83392adfcaad478688e6916a471919d8798ff53","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","c665d5c50c2573aefd98f0ffb12c5583e333ed94294ce6f144a4163a8c84f09b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"8a215750db3e2073511e07c9e293c8c40d6109e5c7368845e060bcc12adbae6f","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","6849f52499689b5b0fe0e6eaeb76f77540ee9432efcda536eb7792a776e72469","0e7a7b48229b572889a27af348f7cdb2c158c7681abd6e0c6519abd6cebd9e32","b028c23042d55cb3e800d95f01fcd5f0bf4c60f55436d8893fa7c9cc51d4f1bc",{"version":"d50907e4de4aba04f132d849e583f9b6c557f695339ae44611eb3b92b62094d5","signature":"59e0e654b5b8dcd33c88648d257a9647b0e4c6748490f3c9172fa69342f2197c"},{"version":"30ba135a2560cdeeba24951c45f396dc81fda9177f044401ecfa7ae00ec14ca7","signature":"29a6655bb4e637e54e67ea8213a53afce35c868c2a22a8ec24ee00db751005b6"},{"version":"6af3a55e8433a439a494457c7dfcc5236261a91011e01311ae3ef608aa709938","signature":"a13c2a658a40bf4114df535253d98e290b9953f3afd49d564f01c24f4d17338f"},{"version":"e216bb69ecd755440c51cda214c2b2b57db13cc196486dc117c3153d3cc96883","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"bc6a5524c9b408e1e310ba838b5af3790cb9bdb0d60dd0d8f594ff670e770455","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"516a426e3960379f310107635b8f3a7e8c307c6c665080b128039d9299ec4087","affectsGlobalScope":true}],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":5},"fileIdsList":[[105],[105,125,127],[62,105],[65,105],[66,71,105],[67,77,78,85,94,104,105],[67,68,77,85,105],[69,105],[70,71,78,86,105],[71,94,101,105],[72,74,77,85,105],[73,105],[74,75,105],[76,77,105],[77,105],[77,78,79,94,104,105],[77,78,79,94,105],[80,85,94,104,105],[77,78,80,81,85,94,101,104,105],[80,82,94,101,104,105],[62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],[77,83,105],[84,104,105],[74,77,85,94,105],[86,105],[87,105],[65,88,105],[89,103,105,109],[90,105],[91,105],[77,92,105],[92,93,105,107],[77,94,95,96,105],[94,96,105],[94,95,105],[97,105],[98,105],[77,99,100,105],[99,100,105],[71,85,101,105],[102,105],[85,103,105],[66,80,91,104,105],[71,105],[94,105,106],[105,107],[105,108],[66,71,77,79,88,94,104,105,107,109],[94,105,110],[105,121,122],[105,121,122,123,124],[105,126],[54,105],[53,62,105],[56,105],[54,56,105,116,117],[105,116],[62,105,115,120],[105,115,120],[61,105,113,114],[58,60,105],[59,105],[60,105],[105,112],[105,112,113],[54,56,116,117],[115]],"referencedMap":[[53,1],[128,2],[62,3],[63,3],[65,4],[66,5],[67,6],[68,7],[69,8],[70,9],[71,10],[72,11],[73,12],[74,13],[75,13],[76,14],[77,15],[78,16],[79,17],[64,1],[111,1],[80,18],[81,19],[82,20],[112,21],[83,22],[84,23],[85,24],[86,25],[87,26],[88,27],[89,28],[90,29],[91,30],[92,31],[93,32],[94,33],[96,34],[95,35],[97,36],[98,37],[99,38],[100,39],[101,40],[102,41],[103,42],[104,43],[105,44],[106,45],[107,46],[108,47],[109,48],[110,49],[121,1],[123,50],[125,51],[124,50],[122,1],[127,52],[126,1],[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[32,1],[33,1],[34,1],[35,1],[7,1],[36,1],[41,1],[42,1],[37,1],[38,1],[39,1],[40,1],[8,1],[46,1],[43,1],[44,1],[45,1],[47,1],[9,1],[48,1],[49,1],[50,1],[51,1],[1,1],[10,1],[52,1],[55,53],[54,54],[57,55],[56,54],[118,56],[119,57],[116,58],[120,1],[117,59],[115,60],[59,61],[60,62],[58,1],[61,63],[113,64],[114,65]],"exportedModulesMap":[[53,1],[128,2],[62,3],[63,3],[65,4],[66,5],[67,6],[68,7],[69,8],[70,9],[71,10],[72,11],[73,12],[74,13],[75,13],[76,14],[77,15],[78,16],[79,17],[64,1],[111,1],[80,18],[81,19],[82,20],[112,21],[83,22],[84,23],[85,24],[86,25],[87,26],[88,27],[89,28],[90,29],[91,30],[92,31],[93,32],[94,33],[96,34],[95,35],[97,36],[98,37],[99,38],[100,39],[101,40],[102,41],[103,42],[104,43],[105,44],[106,45],[107,46],[108,47],[109,48],[110,49],[121,1],[123,50],[125,51],[124,50],[122,1],[127,52],[126,1],[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[32,1],[33,1],[34,1],[35,1],[7,1],[36,1],[41,1],[42,1],[37,1],[38,1],[39,1],[40,1],[8,1],[46,1],[43,1],[44,1],[45,1],[47,1],[9,1],[48,1],[49,1],[50,1],[51,1],[1,1],[10,1],[52,1],[118,66],[116,67],[120,1],[115,60],[59,61],[60,62],[58,1],[61,63],[113,64],[114,65]],"semanticDiagnosticsPerFile":[53,128,62,63,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,64,111,80,81,82,112,83,84,85,86,87,88,89,90,91,92,93,94,96,95,97,98,99,100,101,102,103,104,105,106,107,108,109,110,121,123,125,124,122,127,126,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,36,41,42,37,38,39,40,8,46,43,44,45,47,9,48,49,50,51,1,10,52,55,54,57,56,118,119,116,120,117,115,59,60,58,61,113,114]},"version":"4.7.4"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/crypto",
3
- "version": "2.33.8-dev.8609bc45",
3
+ "version": "2.33.9-dev.e605934d",
4
4
  "description": "Basic crypto key utils",
5
5
  "license": "MIT",
6
6
  "author": "DXOS.org",
@@ -11,13 +11,13 @@
11
11
  "src"
12
12
  ],
13
13
  "dependencies": {
14
- "@dxos/protocols": "2.33.8-dev.8609bc45",
14
+ "@dxos/protocols": "2.33.9-dev.e605934d",
15
15
  "crypto-js": "^3.1.9-1",
16
16
  "hypercore-crypto": "^2.3.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@dxos/eslint-plugin": "~1.0.34",
20
- "@dxos/protocols-toolchain": "2.33.7",
20
+ "@dxos/protocols-toolchain": "2.33.8",
21
21
  "@types/crypto-js": "~4.0.2",
22
22
  "@types/jest": "^26.0.7",
23
23
  "@types/node": "^16.11.27",
package/src/index.ts CHANGED
@@ -4,6 +4,5 @@
4
4
 
5
5
  export * from './encrypt';
6
6
  export * from './hash';
7
- export * from './human-hash';
8
7
  export * from './keys';
9
8
  export * from './validator';
package/src/keys.test.ts CHANGED
@@ -4,24 +4,8 @@
4
4
 
5
5
  // DXOS testing browser.
6
6
 
7
- import { createKeyPair, createId, hasher, humanize, keyToBuffer, keyToString } from './keys';
8
-
9
- test('Basic key operations', () => {
10
- const { publicKey } = createKeyPair();
11
-
12
- expect(keyToBuffer(keyToString(publicKey))).toEqual(publicKey);
13
-
14
- expect(() => keyToString('not-a-buffer' as any)).toThrowError();
15
- expect(() => keyToBuffer('not-a-value-hex-key')).toThrowError();
16
- expect(() => keyToBuffer(publicKey as any)).toThrowError();
17
- });
18
-
19
- test('Hashing', () => {
20
- const { publicKey, secretKey } = createKeyPair();
7
+ import { createId } from './keys';
21
8
 
9
+ test('Create id is unique', () => {
22
10
  expect(createId()).not.toEqual(createId());
23
-
24
- expect(humanize(publicKey)).not.toEqual(humanize(secretKey));
25
- expect(humanize(publicKey)).toEqual(hasher.humanize(keyToString(publicKey)));
26
- expect(hasher.humanize(createId())).toBeDefined();
27
11
  });
package/src/keys.ts CHANGED
@@ -5,23 +5,12 @@
5
5
  import assert from 'assert';
6
6
  import crypto from 'hypercore-crypto';
7
7
 
8
- import { PublicKey, PublicKeyLike } from '@dxos/protocols';
8
+ import { PublicKey, PublicKeyLike, PUBLIC_KEY_LENGTH, SECRET_KEY_LENGTH } from '@dxos/protocols';
9
9
 
10
- import { HumanHasher } from './human-hash';
11
-
12
- export const hasher = new HumanHasher();
13
-
14
- export const PUBLIC_KEY_LENGTH = 32; // TODO(wittjosiah): Move to protocols with PublicKey?
15
- export const SECRET_KEY_LENGTH = 64;
16
10
  export const SIGNATURE_LENGTH = 64;
17
11
 
18
12
  export const zeroKey = () => new Uint8Array(32);
19
13
 
20
- /* The purpose of this module is to assure consistent use of keys throughout the project.
21
- * Keys should be maintained as buffers in objects and proto definitions, and converted to hex
22
- * strings as late as possible (eg, to log/display).
23
- */
24
-
25
14
  export interface KeyPair {
26
15
  publicKey: Buffer
27
16
  secretKey: Buffer
@@ -37,41 +26,6 @@ export const createKeyPair = (seed?: Buffer): KeyPair => {
37
26
 
38
27
  export const discoveryKey = (key: PublicKeyLike): Buffer => crypto.discoveryKey(PublicKey.from(key).asBuffer());
39
28
 
40
- /**
41
- * @param {string} str - Hex string representation of key.
42
- * @return {Buffer} Key buffer.
43
- */
44
- export const keyToBuffer = (str: string): Buffer => {
45
- assert(typeof str === 'string', 'Invalid type');
46
- const buffer = Buffer.from(str, 'hex');
47
- assert(buffer.length === PUBLIC_KEY_LENGTH || buffer.length === SECRET_KEY_LENGTH,
48
- `Invalid key length: ${buffer.length}`);
49
- return buffer;
50
- };
51
-
52
- /**
53
- * @param {Buffer | Uint8Array} buffer - Key buffer.
54
- * @return {string} Hex string representation of key.
55
- */
56
- export const keyToString = (buffer: PublicKeyLike): string => {
57
- if (buffer instanceof PublicKey) {
58
- buffer = buffer.asBuffer();
59
- } else if (buffer instanceof Uint8Array) {
60
- buffer = Buffer.from(buffer);
61
- }
62
-
63
- assert(buffer instanceof Buffer, 'Invalid type');
64
- return buffer.toString('hex');
65
- };
66
-
67
- export const humanize = (value: PublicKeyLike): string => {
68
- if (value instanceof PublicKey || value instanceof Buffer || value instanceof Uint8Array) {
69
- value = keyToString(value);
70
- }
71
-
72
- return hasher.humanize(value);
73
- };
74
-
75
29
  /**
76
30
  * Return random bytes of length.
77
31
  * @param [length=32]
@@ -82,7 +36,8 @@ export const randomBytes = (length = 32): Buffer => crypto.randomBytes(length);
82
36
  /**
83
37
  * @return {string}
84
38
  */
85
- export const createId = (): string => keyToString(randomBytes(32));
39
+ // TODO(wittjosiah): This probably shouldn't rely on PublicKey?
40
+ export const createId = (): string => PublicKey.stringify(randomBytes(32));
86
41
 
87
42
  /**
88
43
  * Sign the contents of message with secretKey
package/src/validator.ts CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  import { verify } from 'hypercore-crypto';
6
6
 
7
- import { keyToBuffer } from './keys';
7
+ import { PublicKey } from '@dxos/protocols';
8
8
 
9
9
  /**
10
10
  * Generator for signature validation function.
11
11
  * @param {String} publicKey
12
12
  */
13
13
  export const getSignatureValidator =
14
- (publicKey: string) => (message: Buffer, signature: Buffer) => verify(message, signature, keyToBuffer(publicKey));
14
+ (publicKey: string) => (message: Buffer, signature: Buffer) => verify(message, signature, PublicKey.bufferize(publicKey));
@@ -1,39 +0,0 @@
1
- /**
2
- * humanhash: Human-readable representations of digests.
3
- */
4
- export declare class HumanHasher {
5
- private readonly wordlist;
6
- /**
7
- * Transforms hex digests to human-readable strings.
8
- *
9
- * The format of these strings will look something like:
10
- * `victor-bacon-zulu-lima`. The output is obtained by compressing the input
11
- * digest to a fixed number of bytes, then mapping those bytes to one of 256
12
- * words. A default wordlist is provided, but you can override this if you
13
- * prefer.
14
- * As long as you use the same wordlist, the output will be consistent (i.e.
15
- * the same digest will always render the same representation).
16
- *
17
- * @param wordlist A list of exactly 256 words to choose from
18
- */
19
- constructor(wordlist?: string[]);
20
- /**
21
- * Humanize a given hexadecimal digest.
22
- *
23
- * Change the number of words output by specifying `words`. Change the
24
- * word separator with `separator`.
25
- *
26
- * @param hexdigest A string of hexadecimal characters to humanize
27
- * @param words How many words to output (more = safer)
28
- * @param separator The string used to seperate the words
29
- */
30
- humanize(hexdigest: string, words?: number, separator?: string): string;
31
- /**
32
- * Compress a list of byte values to a fixed target length.
33
- *
34
- * @param bytes A list of bytes (numbers from 0-254)
35
- * @param target The number of bytes to return / compress to
36
- */
37
- _compress(bytes: number[], target: number): number[];
38
- }
39
- //# sourceMappingURL=human-hash.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"human-hash.d.ts","sourceRoot":"","sources":["../../src/human-hash.ts"],"names":[],"mappings":"AA4CA;;GAEG;AAEH,qBAAa,WAAW;IAcT,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAbtC;;;;;;;;;;;;OAYG;gBAC2B,QAAQ,WAAmB;IAOzD;;;;;;;;;OASG;IACH,QAAQ,CAAE,SAAS,EAAE,MAAM,EAAE,KAAK,SAAI,EAAE,SAAS,SAAM;IAYvD;;;;;OAKG;IACH,SAAS,CAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM;CAqB3C"}
@@ -1,114 +0,0 @@
1
- "use strict";
2
- //
3
- // Copyright 2021 DXOS.org
4
- //
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.HumanHasher = void 0;
7
- // From https://github.com/SEBv15/humanhash/blob/166c1a6f70d854fe6767cdd76be1237112d4eaf1/index.js
8
- const DEFAULT_WORDLIST = [
9
- 'ack', 'alabama', 'alanine', 'alaska', 'alpha', 'angel', 'apart', 'april',
10
- 'arizona', 'arkansas', 'artist', 'asparagus', 'aspen', 'august', 'autumn',
11
- 'avocado', 'bacon', 'bakerloo', 'batman', 'beer', 'berlin', 'beryllium',
12
- 'black', 'blossom', 'blue', 'bluebird', 'bravo', 'bulldog', 'burger',
13
- 'butter', 'california', 'carbon', 'cardinal', 'carolina', 'carpet', 'cat',
14
- 'ceiling', 'charlie', 'chicken', 'coffee', 'cola', 'cold', 'colorado',
15
- 'comet', 'connecticut', 'crazy', 'cup', 'dakota', 'december', 'delaware',
16
- 'delta', 'diet', 'don', 'double', 'early', 'earth', 'east', 'echo',
17
- 'edward', 'eight', 'eighteen', 'eleven', 'emma', 'enemy', 'equal',
18
- 'failed', 'fanta', 'fifteen', 'fillet', 'finch', 'fish', 'five', 'fix',
19
- 'floor', 'florida', 'football', 'four', 'fourteen', 'foxtrot', 'freddie',
20
- 'friend', 'fruit', 'gee', 'georgia', 'glucose', 'golf', 'green', 'grey',
21
- 'hamper', 'happy', 'harry', 'hawaii', 'helium', 'high', 'hot', 'hotel',
22
- 'hydrogen', 'idaho', 'illinois', 'india', 'indigo', 'ink', 'iowa',
23
- 'island', 'item', 'jersey', 'jig', 'johnny', 'juliet', 'july', 'jupiter',
24
- 'kansas', 'kentucky', 'kilo', 'king', 'kitten', 'lactose', 'lake', 'lamp',
25
- 'lemon', 'leopard', 'lima', 'lion', 'lithium', 'london', 'louisiana',
26
- 'low', 'magazine', 'magnesium', 'maine', 'mango', 'march', 'mars',
27
- 'maryland', 'massachusetts', 'may', 'mexico', 'michigan', 'mike',
28
- 'minnesota', 'mirror', 'mississippi', 'missouri', 'mobile', 'mockingbird',
29
- 'monkey', 'montana', 'moon', 'mountain', 'muppet', 'music', 'nebraska',
30
- 'neptune', 'network', 'nevada', 'nine', 'nineteen', 'nitrogen', 'north',
31
- 'november', 'nuts', 'october', 'ohio', 'oklahoma', 'one', 'orange',
32
- 'oranges', 'oregon', 'oscar', 'oven', 'oxygen', 'papa', 'paris', 'pasta',
33
- 'pennsylvania', 'pip', 'pizza', 'pluto', 'potato', 'princess', 'purple',
34
- 'quebec', 'queen', 'quiet', 'red', 'river', 'robert', 'robin', 'romeo',
35
- 'rugby', 'sad', 'salami', 'saturn', 'september', 'seven', 'seventeen',
36
- 'shade', 'sierra', 'single', 'sink', 'six', 'sixteen', 'skylark', 'snake',
37
- 'social', 'sodium', 'solar', 'south', 'spaghetti', 'speaker', 'spring',
38
- 'stairway', 'steak', 'stream', 'summer', 'sweet', 'table', 'tango', 'ten',
39
- 'tennessee', 'tennis', 'texas', 'thirteen', 'three', 'timing', 'triple',
40
- 'twelve', 'twenty', 'two', 'uncle', 'undress', 'uniform', 'uranus', 'utah',
41
- 'vegan', 'venus', 'vermont', 'victor', 'video', 'violet', 'virginia',
42
- 'washington', 'west', 'whiskey', 'white', 'william', 'winner', 'winter',
43
- 'wisconsin', 'wolfram', 'wyoming', 'xray', 'yankee', 'yellow', 'zebra', 'zulu'
44
- ];
45
- /**
46
- * humanhash: Human-readable representations of digests.
47
- */
48
- // TODO(wittjosiah): Move to debug?
49
- class HumanHasher {
50
- /**
51
- * Transforms hex digests to human-readable strings.
52
- *
53
- * The format of these strings will look something like:
54
- * `victor-bacon-zulu-lima`. The output is obtained by compressing the input
55
- * digest to a fixed number of bytes, then mapping those bytes to one of 256
56
- * words. A default wordlist is provided, but you can override this if you
57
- * prefer.
58
- * As long as you use the same wordlist, the output will be consistent (i.e.
59
- * the same digest will always render the same representation).
60
- *
61
- * @param wordlist A list of exactly 256 words to choose from
62
- */
63
- constructor(wordlist = DEFAULT_WORDLIST) {
64
- this.wordlist = wordlist;
65
- if (wordlist.length !== 256) {
66
- throw new Error('Wordlist must have exactly 256 items');
67
- }
68
- this.wordlist = wordlist;
69
- }
70
- /**
71
- * Humanize a given hexadecimal digest.
72
- *
73
- * Change the number of words output by specifying `words`. Change the
74
- * word separator with `separator`.
75
- *
76
- * @param hexdigest A string of hexadecimal characters to humanize
77
- * @param words How many words to output (more = safer)
78
- * @param separator The string used to seperate the words
79
- */
80
- humanize(hexdigest, words = 4, separator = '-') {
81
- const pairs = hexdigest.match(/(..?)/g);
82
- if (!pairs) {
83
- throw new Error('');
84
- }
85
- const bytes = pairs.map((x) => parseInt(x, 16));
86
- const compressed = this._compress(bytes, words);
87
- return compressed.map((x) => this.wordlist[x]).join(separator);
88
- }
89
- /**
90
- * Compress a list of byte values to a fixed target length.
91
- *
92
- * @param bytes A list of bytes (numbers from 0-254)
93
- * @param target The number of bytes to return / compress to
94
- */
95
- _compress(bytes, target) {
96
- const length = bytes.length;
97
- if (target > length) {
98
- throw new Error('Fewer input bytes than requested output');
99
- }
100
- // Calculate the segment size (divide and round down)
101
- const segSize = length / target >> 0;
102
- // Split 'bytes' array into 'target' number of segments.
103
- const segments = [];
104
- for (let i = 0; i < segSize * target; i += segSize) {
105
- segments.push(bytes.slice(i, i + segSize));
106
- }
107
- // Catch any left-over bytes in the last segment.
108
- segments[segments.length - 1] = segments[segments.length - 1].concat(bytes.slice(target * segSize));
109
- const checksums = segments.map((x) => x.reduce((acc, curr) => acc ^ curr));
110
- return checksums;
111
- }
112
- }
113
- exports.HumanHasher = HumanHasher;
114
- //# sourceMappingURL=human-hash.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"human-hash.js","sourceRoot":"","sources":["../../src/human-hash.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,kGAAkG;AAElG,MAAM,gBAAgB,GAAG;IACvB,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;IACzE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;IACzE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW;IACvE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ;IACpE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK;IACzE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;IACrE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU;IACxE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MA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I,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,IAAI,OAAO,EAAE;YAClD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;SAC5C;QAED,iDAAiD;QACjD,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;QAEpG,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC;QAC3E,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAtED,kCAsEC"}
package/src/human-hash.ts DELETED
@@ -1,119 +0,0 @@
1
- //
2
- // Copyright 2021 DXOS.org
3
- //
4
-
5
- // From https://github.com/SEBv15/humanhash/blob/166c1a6f70d854fe6767cdd76be1237112d4eaf1/index.js
6
-
7
- const DEFAULT_WORDLIST = [
8
- 'ack', 'alabama', 'alanine', 'alaska', 'alpha', 'angel', 'apart', 'april',
9
- 'arizona', 'arkansas', 'artist', 'asparagus', 'aspen', 'august', 'autumn',
10
- 'avocado', 'bacon', 'bakerloo', 'batman', 'beer', 'berlin', 'beryllium',
11
- 'black', 'blossom', 'blue', 'bluebird', 'bravo', 'bulldog', 'burger',
12
- 'butter', 'california', 'carbon', 'cardinal', 'carolina', 'carpet', 'cat',
13
- 'ceiling', 'charlie', 'chicken', 'coffee', 'cola', 'cold', 'colorado',
14
- 'comet', 'connecticut', 'crazy', 'cup', 'dakota', 'december', 'delaware',
15
- 'delta', 'diet', 'don', 'double', 'early', 'earth', 'east', 'echo',
16
- 'edward', 'eight', 'eighteen', 'eleven', 'emma', 'enemy', 'equal',
17
- 'failed', 'fanta', 'fifteen', 'fillet', 'finch', 'fish', 'five', 'fix',
18
- 'floor', 'florida', 'football', 'four', 'fourteen', 'foxtrot', 'freddie',
19
- 'friend', 'fruit', 'gee', 'georgia', 'glucose', 'golf', 'green', 'grey',
20
- 'hamper', 'happy', 'harry', 'hawaii', 'helium', 'high', 'hot', 'hotel',
21
- 'hydrogen', 'idaho', 'illinois', 'india', 'indigo', 'ink', 'iowa',
22
- 'island', 'item', 'jersey', 'jig', 'johnny', 'juliet', 'july', 'jupiter',
23
- 'kansas', 'kentucky', 'kilo', 'king', 'kitten', 'lactose', 'lake', 'lamp',
24
- 'lemon', 'leopard', 'lima', 'lion', 'lithium', 'london', 'louisiana',
25
- 'low', 'magazine', 'magnesium', 'maine', 'mango', 'march', 'mars',
26
- 'maryland', 'massachusetts', 'may', 'mexico', 'michigan', 'mike',
27
- 'minnesota', 'mirror', 'mississippi', 'missouri', 'mobile', 'mockingbird',
28
- 'monkey', 'montana', 'moon', 'mountain', 'muppet', 'music', 'nebraska',
29
- 'neptune', 'network', 'nevada', 'nine', 'nineteen', 'nitrogen', 'north',
30
- 'november', 'nuts', 'october', 'ohio', 'oklahoma', 'one', 'orange',
31
- 'oranges', 'oregon', 'oscar', 'oven', 'oxygen', 'papa', 'paris', 'pasta',
32
- 'pennsylvania', 'pip', 'pizza', 'pluto', 'potato', 'princess', 'purple',
33
- 'quebec', 'queen', 'quiet', 'red', 'river', 'robert', 'robin', 'romeo',
34
- 'rugby', 'sad', 'salami', 'saturn', 'september', 'seven', 'seventeen',
35
- 'shade', 'sierra', 'single', 'sink', 'six', 'sixteen', 'skylark', 'snake',
36
- 'social', 'sodium', 'solar', 'south', 'spaghetti', 'speaker', 'spring',
37
- 'stairway', 'steak', 'stream', 'summer', 'sweet', 'table', 'tango', 'ten',
38
- 'tennessee', 'tennis', 'texas', 'thirteen', 'three', 'timing', 'triple',
39
- 'twelve', 'twenty', 'two', 'uncle', 'undress', 'uniform', 'uranus', 'utah',
40
- 'vegan', 'venus', 'vermont', 'victor', 'video', 'violet', 'virginia',
41
- 'washington', 'west', 'whiskey', 'white', 'william', 'winner', 'winter',
42
- 'wisconsin', 'wolfram', 'wyoming', 'xray', 'yankee', 'yellow', 'zebra', 'zulu'
43
- ];
44
-
45
- /**
46
- * humanhash: Human-readable representations of digests.
47
- */
48
- // TODO(wittjosiah): Move to debug?
49
- export class HumanHasher {
50
- /**
51
- * Transforms hex digests to human-readable strings.
52
- *
53
- * The format of these strings will look something like:
54
- * `victor-bacon-zulu-lima`. The output is obtained by compressing the input
55
- * digest to a fixed number of bytes, then mapping those bytes to one of 256
56
- * words. A default wordlist is provided, but you can override this if you
57
- * prefer.
58
- * As long as you use the same wordlist, the output will be consistent (i.e.
59
- * the same digest will always render the same representation).
60
- *
61
- * @param wordlist A list of exactly 256 words to choose from
62
- */
63
- constructor (private readonly wordlist = DEFAULT_WORDLIST) {
64
- if (wordlist.length !== 256) {
65
- throw new Error('Wordlist must have exactly 256 items');
66
- }
67
- this.wordlist = wordlist;
68
- }
69
-
70
- /**
71
- * Humanize a given hexadecimal digest.
72
- *
73
- * Change the number of words output by specifying `words`. Change the
74
- * word separator with `separator`.
75
- *
76
- * @param hexdigest A string of hexadecimal characters to humanize
77
- * @param words How many words to output (more = safer)
78
- * @param separator The string used to seperate the words
79
- */
80
- humanize (hexdigest: string, words = 4, separator = '-') {
81
- const pairs = hexdigest.match(/(..?)/g);
82
- if (!pairs) {
83
- throw new Error('');
84
- }
85
-
86
- const bytes = pairs.map((x) => parseInt(x, 16));
87
- const compressed = this._compress(bytes, words);
88
-
89
- return compressed.map((x) => this.wordlist[x]).join(separator);
90
- }
91
-
92
- /**
93
- * Compress a list of byte values to a fixed target length.
94
- *
95
- * @param bytes A list of bytes (numbers from 0-254)
96
- * @param target The number of bytes to return / compress to
97
- */
98
- _compress (bytes: number[], target: number) {
99
- const length = bytes.length;
100
- if (target > length) {
101
- throw new Error('Fewer input bytes than requested output');
102
- }
103
-
104
- // Calculate the segment size (divide and round down)
105
- const segSize = length / target >> 0;
106
-
107
- // Split 'bytes' array into 'target' number of segments.
108
- const segments = [];
109
- for (let i = 0; i < segSize * target; i += segSize) {
110
- segments.push(bytes.slice(i, i + segSize));
111
- }
112
-
113
- // Catch any left-over bytes in the last segment.
114
- segments[segments.length - 1] = segments[segments.length - 1].concat(bytes.slice(target * segSize));
115
-
116
- const checksums = segments.map((x) => x.reduce((acc, curr) => acc ^ curr));
117
- return checksums;
118
- }
119
- }