cas-typescript-sdk 1.0.54 → 1.0.55

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.
Files changed (118) hide show
  1. package/index.js +52 -52
  2. package/index.win32-x64-msvc.node +0 -0
  3. package/lib/asymmetric/RSAWrapper.d.ts +1 -1
  4. package/lib/asymmetric/RSAWrapper.d.ts.map +1 -1
  5. package/lib/asymmetric/RSAWrapper.js +9 -5
  6. package/lib/asymmetric/RSAWrapper.js.map +1 -1
  7. package/lib/asymmetric/index.d.ts +3 -2
  8. package/lib/asymmetric/index.d.ts.map +1 -1
  9. package/lib/asymmetric/index.js +5 -2
  10. package/lib/asymmetric/index.js.map +1 -1
  11. package/lib/digital-signature/digital-siganture-sha-512.d.ts +2 -2
  12. package/lib/digital-signature/digital-siganture-sha-512.d.ts.map +1 -1
  13. package/lib/digital-signature/digital-siganture-sha-512.js +8 -4
  14. package/lib/digital-signature/digital-siganture-sha-512.js.map +1 -1
  15. package/lib/digital-signature/digital-signature-base.d.ts +1 -1
  16. package/lib/digital-signature/digital-signature-base.d.ts.map +1 -1
  17. package/lib/digital-signature/digital-signature-base.js +2 -1
  18. package/lib/digital-signature/digital-signature-factory.d.ts +1 -1
  19. package/lib/digital-signature/digital-signature-factory.d.ts.map +1 -1
  20. package/lib/digital-signature/digital-signature-factory.js +11 -7
  21. package/lib/digital-signature/digital-signature-factory.js.map +1 -1
  22. package/lib/digital-signature/digital-signaturte-sha-256.d.ts +4 -4
  23. package/lib/digital-signature/digital-signaturte-sha-256.d.ts.map +1 -1
  24. package/lib/digital-signature/digital-signaturte-sha-256.js +10 -6
  25. package/lib/digital-signature/digital-signaturte-sha-256.js.map +1 -1
  26. package/lib/digital-signature/index.d.ts +5 -5
  27. package/lib/digital-signature/index.d.ts.map +1 -1
  28. package/lib/digital-signature/index.js +11 -6
  29. package/lib/digital-signature/index.js.map +1 -1
  30. package/lib/hashers/blake2-wrapper.d.ts +1 -1
  31. package/lib/hashers/blake2-wrapper.d.ts.map +1 -1
  32. package/lib/hashers/blake2-wrapper.js +10 -6
  33. package/lib/hashers/blake2-wrapper.js.map +1 -1
  34. package/lib/hashers/hasher-base.js +2 -1
  35. package/lib/hashers/hasher-factory.d.ts +1 -1
  36. package/lib/hashers/hasher-factory.d.ts.map +1 -1
  37. package/lib/hashers/hasher-factory.js +11 -7
  38. package/lib/hashers/hasher-factory.js.map +1 -1
  39. package/lib/hashers/hasher-type.js +5 -2
  40. package/lib/hashers/hasher-type.js.map +1 -1
  41. package/lib/hashers/index.d.ts +4 -4
  42. package/lib/hashers/index.d.ts.map +1 -1
  43. package/lib/hashers/index.js +11 -5
  44. package/lib/hashers/index.js.map +1 -1
  45. package/lib/hashers/sha-wrapper.d.ts +1 -1
  46. package/lib/hashers/sha-wrapper.d.ts.map +1 -1
  47. package/lib/hashers/sha-wrapper.js +10 -6
  48. package/lib/hashers/sha-wrapper.js.map +1 -1
  49. package/lib/hybrid/hpke.d.ts +1 -1
  50. package/lib/hybrid/hpke.d.ts.map +1 -1
  51. package/lib/hybrid/hpke.js +10 -6
  52. package/lib/hybrid/hpke.js.map +1 -1
  53. package/lib/hybrid/index.d.ts +1 -1
  54. package/lib/hybrid/index.d.ts.map +1 -1
  55. package/lib/hybrid/index.js +5 -2
  56. package/lib/hybrid/index.js.map +1 -1
  57. package/lib/index.d.ts +10 -41
  58. package/lib/index.d.ts.map +1 -1
  59. package/lib/index.js +26 -41
  60. package/lib/index.js.map +1 -1
  61. package/lib/key_exchange/index.d.ts +2 -2
  62. package/lib/key_exchange/index.d.ts.map +1 -1
  63. package/lib/key_exchange/index.js +5 -3
  64. package/lib/key_exchange/index.js.map +1 -1
  65. package/lib/key_exchange/x25519.d.ts +1 -1
  66. package/lib/key_exchange/x25519.d.ts.map +1 -1
  67. package/lib/key_exchange/x25519.js +8 -4
  68. package/lib/key_exchange/x25519.js.map +1 -1
  69. package/lib/message/hmac.js +8 -4
  70. package/lib/message/hmac.js.map +1 -1
  71. package/lib/message/index.d.ts +1 -1
  72. package/lib/message/index.d.ts.map +1 -1
  73. package/lib/message/index.js +5 -2
  74. package/lib/message/index.js.map +1 -1
  75. package/lib/password-hashers/argon2-wrapper.d.ts +1 -1
  76. package/lib/password-hashers/argon2-wrapper.d.ts.map +1 -1
  77. package/lib/password-hashers/argon2-wrapper.js +9 -5
  78. package/lib/password-hashers/argon2-wrapper.js.map +1 -1
  79. package/lib/password-hashers/bcrypt-wrapper.d.ts +1 -1
  80. package/lib/password-hashers/bcrypt-wrapper.d.ts.map +1 -1
  81. package/lib/password-hashers/bcrypt-wrapper.js +9 -5
  82. package/lib/password-hashers/bcrypt-wrapper.js.map +1 -1
  83. package/lib/password-hashers/index.d.ts +5 -5
  84. package/lib/password-hashers/index.d.ts.map +1 -1
  85. package/lib/password-hashers/index.js +13 -6
  86. package/lib/password-hashers/index.js.map +1 -1
  87. package/lib/password-hashers/password-hasher-base.js +2 -1
  88. package/lib/password-hashers/password-hasher-factory.d.ts +1 -1
  89. package/lib/password-hashers/password-hasher-factory.d.ts.map +1 -1
  90. package/lib/password-hashers/password-hasher-factory.js +14 -10
  91. package/lib/password-hashers/password-hasher-factory.js.map +1 -1
  92. package/lib/password-hashers/password-hasher-type.js +5 -2
  93. package/lib/password-hashers/password-hasher-type.js.map +1 -1
  94. package/lib/password-hashers/scrypt-wrapper.d.ts +1 -1
  95. package/lib/password-hashers/scrypt-wrapper.d.ts.map +1 -1
  96. package/lib/password-hashers/scrypt-wrapper.js +9 -5
  97. package/lib/password-hashers/scrypt-wrapper.js.map +1 -1
  98. package/lib/signature/ed25519-wrapper.d.ts +2 -2
  99. package/lib/signature/ed25519-wrapper.d.ts.map +1 -1
  100. package/lib/signature/ed25519-wrapper.js +9 -5
  101. package/lib/signature/ed25519-wrapper.js.map +1 -1
  102. package/lib/signature/index.d.ts +1 -1
  103. package/lib/signature/index.d.ts.map +1 -1
  104. package/lib/signature/index.js +5 -2
  105. package/lib/signature/index.js.map +1 -1
  106. package/lib/sponges/ascon-wrapper.js +10 -6
  107. package/lib/sponges/ascon-wrapper.js.map +1 -1
  108. package/lib/sponges/index.d.ts +1 -1
  109. package/lib/sponges/index.d.ts.map +1 -1
  110. package/lib/sponges/index.js +5 -2
  111. package/lib/sponges/index.js.map +1 -1
  112. package/lib/symmetric/aes-wrapper.js +15 -11
  113. package/lib/symmetric/aes-wrapper.js.map +1 -1
  114. package/lib/symmetric/index.d.ts +1 -1
  115. package/lib/symmetric/index.d.ts.map +1 -1
  116. package/lib/symmetric/index.js +5 -2
  117. package/lib/symmetric/index.js.map +1 -1
  118. package/package.json +2 -3
@@ -1,7 +1,12 @@
1
- import { DigitalSignatureType } from "./digital-signature-factory.js";
2
- import { DigitalSignatureFactory } from "./digital-signature-factory.js";
3
- import { DigitalSignatureSHA256Wrapper } from "./digital-signaturte-sha-256.js";
4
- import { DigitalSignatureSHA512Wrapper } from "./digital-siganture-sha-512.js";
5
- import { CASRSADigitalSignatureResult, CASSHAED25519DalekDigitalSignatureResult } from "../index.js";
6
- export { DigitalSignatureFactory, DigitalSignatureSHA256Wrapper, DigitalSignatureSHA512Wrapper, DigitalSignatureType, CASSHAED25519DalekDigitalSignatureResult, CASRSADigitalSignatureResult };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DigitalSignatureType = exports.DigitalSignatureSHA512Wrapper = exports.DigitalSignatureSHA256Wrapper = exports.DigitalSignatureFactory = void 0;
4
+ const digital_signature_factory_1 = require("./digital-signature-factory");
5
+ Object.defineProperty(exports, "DigitalSignatureType", { enumerable: true, get: function () { return digital_signature_factory_1.DigitalSignatureType; } });
6
+ const digital_signature_factory_2 = require("./digital-signature-factory");
7
+ Object.defineProperty(exports, "DigitalSignatureFactory", { enumerable: true, get: function () { return digital_signature_factory_2.DigitalSignatureFactory; } });
8
+ const digital_signaturte_sha_256_1 = require("./digital-signaturte-sha-256");
9
+ Object.defineProperty(exports, "DigitalSignatureSHA256Wrapper", { enumerable: true, get: function () { return digital_signaturte_sha_256_1.DigitalSignatureSHA256Wrapper; } });
10
+ const digital_siganture_sha_512_1 = require("./digital-siganture-sha-512");
11
+ Object.defineProperty(exports, "DigitalSignatureSHA512Wrapper", { enumerable: true, get: function () { return digital_siganture_sha_512_1.DigitalSignatureSHA512Wrapper; } });
7
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/digital-signature/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAErG,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACpB,wCAAwC,EACxC,4BAA4B,EAC7B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/digital-signature/index.ts"],"names":[],"mappings":";;;AAAA,2EAAmE;AAUjE,qGAVO,gDAAoB,OAUP;AATtB,2EAAsE;AAMpE,wGANO,mDAAuB,OAMP;AALzB,6EAA6E;AAM3E,8GANO,0DAA6B,OAMP;AAL/B,2EAA4E;AAM1E,8GANO,yDAA6B,OAMP"}
@@ -1,4 +1,4 @@
1
- import { IHasherBase } from "./hasher-base.js";
1
+ import { IHasherBase } from "./hasher-base";
2
2
  export declare class Blake2Wrapper implements IHasherBase {
3
3
  /**
4
4
  * Hashes the input data using Blake2b 512
@@ -1 +1 @@
1
- {"version":3,"file":"blake2-wrapper.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/blake2-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,aAAc,YAAW,WAAW;IAE7C;;;;OAIG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAIvC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;IAGhE;;;;OAIG;IAEH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAIvC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;CAGnE"}
1
+ {"version":3,"file":"blake2-wrapper.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/blake2-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,aAAc,YAAW,WAAW;IAE7C;;;;OAIG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAIvC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;IAGhE;;;;OAIG;IAEH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAIvC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;CAGnE"}
@@ -1,12 +1,15 @@
1
- import { blake2Sha512Verify, blake2Sha256Verify, blake2Sha256, blake2Sha512 } from "../../index.js";
2
- export class Blake2Wrapper {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Blake2Wrapper = void 0;
4
+ const index_1 = require("../../index");
5
+ class Blake2Wrapper {
3
6
  /**
4
7
  * Hashes the input data using Blake2b 512
5
8
  * @param dataToHash The data to hash
6
9
  * @returns The hashed output
7
10
  */
8
11
  hash512(dataToHash) {
9
- return blake2Sha512(dataToHash);
12
+ return (0, index_1.blake2Sha512)(dataToHash);
10
13
  }
11
14
  /**
12
15
  * Verifies the input data against the hashed output using Blake2b 512
@@ -15,7 +18,7 @@ export class Blake2Wrapper {
15
18
  * @returns True if the verification is successful, false otherwise
16
19
  */
17
20
  verify512(dataToHash, dataToVerify) {
18
- return blake2Sha512Verify(dataToHash, dataToVerify);
21
+ return (0, index_1.blake2Sha512Verify)(dataToHash, dataToVerify);
19
22
  }
20
23
  /**
21
24
  * Hashes the input data using Blake2b 256
@@ -23,7 +26,7 @@ export class Blake2Wrapper {
23
26
  * @returns The hashed output
24
27
  */
25
28
  hash256(dataToHash) {
26
- return blake2Sha256(dataToHash);
29
+ return (0, index_1.blake2Sha256)(dataToHash);
27
30
  }
28
31
  /**
29
32
  * Verifies the input data against the hashed output using Blake2b 256
@@ -32,7 +35,8 @@ export class Blake2Wrapper {
32
35
  * @returns True if the verification is successful, false otherwise
33
36
  */
34
37
  verify256(dataToHash, dataToVerify) {
35
- return blake2Sha256Verify(dataToHash, dataToVerify);
38
+ return (0, index_1.blake2Sha256Verify)(dataToHash, dataToVerify);
36
39
  }
37
40
  }
41
+ exports.Blake2Wrapper = Blake2Wrapper;
38
42
  //# sourceMappingURL=blake2-wrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"blake2-wrapper.js","sourceRoot":"","sources":["../../src-ts/hashers/blake2-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGpG,MAAM,OAAO,aAAa;IAEtB;;;;OAIG;IACH,OAAO,CAAC,UAAoB;QACxB,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QAClD,OAAO,kBAAkB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;IACD;;;;OAIG;IAEH,OAAO,CAAC,UAAoB;QACxB,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QAClD,OAAO,kBAAkB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;CACJ"}
1
+ {"version":3,"file":"blake2-wrapper.js","sourceRoot":"","sources":["../../src-ts/hashers/blake2-wrapper.ts"],"names":[],"mappings":";;;AAAA,uCAAiG;AAGjG,MAAa,aAAa;IAEtB;;;;OAIG;IACH,OAAO,CAAC,UAAoB;QACxB,OAAO,IAAA,oBAAY,EAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QAClD,OAAO,IAAA,0BAAkB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;IACD;;;;OAIG;IAEH,OAAO,CAAC,UAAoB;QACxB,OAAO,IAAA,oBAAY,EAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QAClD,OAAO,IAAA,0BAAkB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;CACJ;AAvCD,sCAuCC"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=hasher-base.js.map
@@ -1,4 +1,4 @@
1
- import { HasherType } from "./hasher-type.js";
1
+ import { HasherType } from "./hasher-type";
2
2
  export declare class HasherFactory {
3
3
  /**
4
4
  * Get the appropriate hasher wrapper based upon the type based in.
@@ -1 +1 @@
1
- {"version":3,"file":"hasher-factory.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/hasher-factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,qBAAa,aAAa;IACtB;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,GAAG;CAQnC"}
1
+ {"version":3,"file":"hasher-factory.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/hasher-factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,qBAAa,aAAa;IACtB;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,GAAG;CAQnC"}
@@ -1,19 +1,23 @@
1
- import { Blake2Wrapper } from "./blake2-wrapper.js";
2
- import { HasherType } from "./hasher-type.js";
3
- import { SHAWrapper } from "./sha-wrapper.js";
4
- export class HasherFactory {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HasherFactory = void 0;
4
+ const blake2_wrapper_1 = require("./blake2-wrapper");
5
+ const hasher_type_1 = require("./hasher-type");
6
+ const sha_wrapper_1 = require("./sha-wrapper");
7
+ class HasherFactory {
5
8
  /**
6
9
  * Get the appropriate hasher wrapper based upon the type based in.
7
10
  * @param type
8
11
  * @returns
9
12
  */
10
13
  getHasher(type) {
11
- let result = new SHAWrapper();
14
+ let result = new sha_wrapper_1.SHAWrapper();
12
15
  switch (type) {
13
- case HasherType.Blake2:
14
- result = new Blake2Wrapper();
16
+ case hasher_type_1.HasherType.Blake2:
17
+ result = new blake2_wrapper_1.Blake2Wrapper();
15
18
  }
16
19
  return result;
17
20
  }
18
21
  }
22
+ exports.HasherFactory = HasherFactory;
19
23
  //# sourceMappingURL=hasher-factory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hasher-factory.js","sourceRoot":"","sources":["../../src-ts/hashers/hasher-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,OAAO,aAAa;IACtB;;;;OAIG;IACH,SAAS,CAAC,IAAgB;QACtB,IAAI,MAAM,GAAe,IAAI,UAAU,EAAE,CAAC;QAC1C,QAAO,IAAI,EAAE,CAAC;YACV,KAAK,UAAU,CAAC,MAAM;gBAClB,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;QACrC,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
1
+ {"version":3,"file":"hasher-factory.js","sourceRoot":"","sources":["../../src-ts/hashers/hasher-factory.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AACjD,+CAA2C;AAC3C,+CAA2C;AAE3C,MAAa,aAAa;IACtB;;;;OAIG;IACH,SAAS,CAAC,IAAgB;QACtB,IAAI,MAAM,GAAe,IAAI,wBAAU,EAAE,CAAC;QAC1C,QAAO,IAAI,EAAE,CAAC;YACV,KAAK,wBAAU,CAAC,MAAM;gBAClB,MAAM,GAAG,IAAI,8BAAa,EAAE,CAAC;QACrC,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAdD,sCAcC"}
@@ -1,6 +1,9 @@
1
- export var HasherType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HasherType = void 0;
4
+ var HasherType;
2
5
  (function (HasherType) {
3
6
  HasherType[HasherType["SHA"] = 1] = "SHA";
4
7
  HasherType[HasherType["Blake2"] = 2] = "Blake2";
5
- })(HasherType || (HasherType = {}));
8
+ })(HasherType || (exports.HasherType = HasherType = {}));
6
9
  //# sourceMappingURL=hasher-type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hasher-type.js","sourceRoot":"","sources":["../../src-ts/hashers/hasher-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,yCAAO,CAAA;IACP,+CAAU,CAAA;AACd,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
1
+ {"version":3,"file":"hasher-type.js","sourceRoot":"","sources":["../../src-ts/hashers/hasher-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,yCAAO,CAAA;IACP,+CAAU,CAAA;AACd,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB"}
@@ -1,6 +1,6 @@
1
- import { HasherFactory } from "./hasher-factory.js";
2
- import { HasherType } from "./hasher-type.js";
3
- import { SHAWrapper } from "./sha-wrapper.js";
4
- import { Blake2Wrapper } from "./blake2-wrapper.js";
1
+ import { HasherFactory } from "./hasher-factory";
2
+ import { HasherType } from "./hasher-type";
3
+ import { SHAWrapper } from "./sha-wrapper";
4
+ import { Blake2Wrapper } from "./blake2-wrapper";
5
5
  export { SHAWrapper, HasherFactory, HasherType, Blake2Wrapper };
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
@@ -1,6 +1,12 @@
1
- import { HasherFactory } from "./hasher-factory.js";
2
- import { HasherType } from "./hasher-type.js";
3
- import { SHAWrapper } from "./sha-wrapper.js";
4
- import { Blake2Wrapper } from "./blake2-wrapper.js";
5
- export { SHAWrapper, HasherFactory, HasherType, Blake2Wrapper };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Blake2Wrapper = exports.HasherType = exports.HasherFactory = exports.SHAWrapper = void 0;
4
+ const hasher_factory_1 = require("./hasher-factory");
5
+ Object.defineProperty(exports, "HasherFactory", { enumerable: true, get: function () { return hasher_factory_1.HasherFactory; } });
6
+ const hasher_type_1 = require("./hasher-type");
7
+ Object.defineProperty(exports, "HasherType", { enumerable: true, get: function () { return hasher_type_1.HasherType; } });
8
+ const sha_wrapper_1 = require("./sha-wrapper");
9
+ Object.defineProperty(exports, "SHAWrapper", { enumerable: true, get: function () { return sha_wrapper_1.SHAWrapper; } });
10
+ const blake2_wrapper_1 = require("./blake2-wrapper");
11
+ Object.defineProperty(exports, "Blake2Wrapper", { enumerable: true, get: function () { return blake2_wrapper_1.Blake2Wrapper; } });
6
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/hashers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/hashers/index.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAK5B,8FALZ,8BAAa,OAKY;AAJlC,+CAA2C;AAIP,2FAJ3B,wBAAU,OAI2B;AAH9C,+CAA2C;AAGlC,2FAHA,wBAAU,OAGA;AAFnB,qDAAiD;AAED,8FAFvC,8BAAa,OAEuC"}
@@ -1,4 +1,4 @@
1
- import { IHasherBase } from "./hasher-base.js";
1
+ import { IHasherBase } from "./hasher-base";
2
2
  export declare class SHAWrapper implements IHasherBase {
3
3
  /**
4
4
  * Hashes a byte array with SHA3-512.
@@ -1 +1 @@
1
- {"version":3,"file":"sha-wrapper.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/sha-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,UAAW,YAAW,WAAW;IAC1C;;;;OAIG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAOvC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;IAUhE;;;;OAIG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAOvC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;CASnE"}
1
+ {"version":3,"file":"sha-wrapper.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/sha-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,UAAW,YAAW,WAAW;IAC1C;;;;OAIG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAOvC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;IAUhE;;;;OAIG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAOvC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;CASnE"}
@@ -1,5 +1,8 @@
1
- import { sha256, sha256Verify, sha512, sha512Verify } from "../../index.js";
2
- export class SHAWrapper {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SHAWrapper = void 0;
4
+ const index_1 = require("../../index");
5
+ class SHAWrapper {
3
6
  /**
4
7
  * Hashes a byte array with SHA3-512.
5
8
  * @param dataToHash
@@ -9,7 +12,7 @@ export class SHAWrapper {
9
12
  if (!dataToHash || dataToHash.length === 0) {
10
13
  throw new Error("You must provide an allocated array of data");
11
14
  }
12
- return sha512(dataToHash);
15
+ return (0, index_1.sha512)(dataToHash);
13
16
  }
14
17
  /**
15
18
  * Verifies unsigned data against an SHA3-512 hash.
@@ -24,7 +27,7 @@ export class SHAWrapper {
24
27
  if (!dataToVerify || dataToVerify.length === 0) {
25
28
  throw new Error("You must provide an allocated array of data to verify");
26
29
  }
27
- return sha512Verify(dataToHash, dataToVerify);
30
+ return (0, index_1.sha512Verify)(dataToHash, dataToVerify);
28
31
  }
29
32
  /**
30
33
  * Hashes a byte array with SHA3-256.
@@ -35,7 +38,7 @@ export class SHAWrapper {
35
38
  if (!dataToHash || dataToHash.length === 0) {
36
39
  throw new Error("You must provide an allocated array of data");
37
40
  }
38
- return sha256(dataToHash);
41
+ return (0, index_1.sha256)(dataToHash);
39
42
  }
40
43
  /**
41
44
  * Verifies unsigned data against an SHA3-256 hash.
@@ -50,7 +53,8 @@ export class SHAWrapper {
50
53
  if (!dataToVerify || dataToVerify.length === 0) {
51
54
  throw new Error("You must provide an allocated array of data to verify");
52
55
  }
53
- return sha256Verify(dataToHash, dataToVerify);
56
+ return (0, index_1.sha256Verify)(dataToHash, dataToVerify);
54
57
  }
55
58
  }
59
+ exports.SHAWrapper = SHAWrapper;
56
60
  //# sourceMappingURL=sha-wrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sha-wrapper.js","sourceRoot":"","sources":["../../src-ts/hashers/sha-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG5E,MAAM,OAAO,UAAU;IACnB;;;;OAIG;IACH,OAAO,CAAC,UAAoB;QACxB,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QAClD,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACnE,CAAC;QACD,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7C,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,UAAoB;QACxB,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QAClD,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACnE,CAAC;QACD,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7C,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAClD,CAAC;CACJ"}
1
+ {"version":3,"file":"sha-wrapper.js","sourceRoot":"","sources":["../../src-ts/hashers/sha-wrapper.ts"],"names":[],"mappings":";;;AAAA,uCAAyE;AAGzE,MAAa,UAAU;IACnB;;;;OAIG;IACH,OAAO,CAAC,UAAoB;QACxB,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,IAAA,cAAM,EAAC,UAAU,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QAClD,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACnE,CAAC;QACD,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7C,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,IAAA,oBAAY,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,UAAoB;QACxB,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,IAAA,cAAM,EAAC,UAAU,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QAClD,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACnE,CAAC;QACD,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7C,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,IAAA,oBAAY,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAClD,CAAC;CACJ;AAxDD,gCAwDC"}
@@ -1,4 +1,4 @@
1
- import { HpkeKeyResult, HpkeEncryptResult } from "../../index.js";
1
+ import { HpkeKeyResult, HpkeEncryptResult } from "../../index";
2
2
  export declare class HpkeWrapper {
3
3
  /**
4
4
  * Generate a new HPKE key pair along with an info string
@@ -1 +1 @@
1
- {"version":3,"file":"hpke.d.ts","sourceRoot":"","sources":["../../src-ts/hybrid/hpke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkE,aAAa,EAAE,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAEhI,qBAAa,WAAW;IAEpB;;;OAGG;IACI,eAAe,IAAI,aAAa;IAIvC;;;OAGG;IACI,kBAAkB,IAAI,MAAM,EAAE;IAIrC;;;;;;OAMG;IACI,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,iBAAiB;IAI9F;;;;;;;;OAQG;IACI,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;CAGpI"}
1
+ {"version":3,"file":"hpke.d.ts","sourceRoot":"","sources":["../../src-ts/hybrid/hpke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkE,aAAa,EAAE,iBAAiB,EAAC,MAAM,aAAa,CAAA;AAE7H,qBAAa,WAAW;IAEpB;;;OAGG;IACI,eAAe,IAAI,aAAa;IAIvC;;;OAGG;IACI,kBAAkB,IAAI,MAAM,EAAE;IAIrC;;;;;;OAMG;IACI,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,iBAAiB;IAI9F;;;;;;;;OAQG;IACI,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;CAGpI"}
@@ -1,18 +1,21 @@
1
- import { hpkeGenerateKeypair, hpkeEncrypt, hpkeDecrypt, generateInfoStr } from "../../index.js";
2
- export class HpkeWrapper {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HpkeWrapper = void 0;
4
+ const index_1 = require("../../index");
5
+ class HpkeWrapper {
3
6
  /**
4
7
  * Generate a new HPKE key pair along with an info string
5
8
  * @returns HpkeKeyResult
6
9
  */
7
10
  generateKeyPair() {
8
- return hpkeGenerateKeypair();
11
+ return (0, index_1.hpkeGenerateKeypair)();
9
12
  }
10
13
  /**
11
14
  * Generate a new info string for HPKE
12
15
  * @returns A byte array representing the info string
13
16
  */
14
17
  generateInfoString() {
15
- return generateInfoStr();
18
+ return (0, index_1.generateInfoStr)();
16
19
  }
17
20
  /**
18
21
  * Encrypt a message using HPKE
@@ -22,7 +25,7 @@ export class HpkeWrapper {
22
25
  * @returns HpkeEncryptResult
23
26
  */
24
27
  encrypt(plaintext, publicKey, infoStr) {
25
- return hpkeEncrypt(plaintext, publicKey, infoStr);
28
+ return (0, index_1.hpkeEncrypt)(plaintext, publicKey, infoStr);
26
29
  }
27
30
  /**
28
31
  * Decrypt a message using HPKE
@@ -34,7 +37,8 @@ export class HpkeWrapper {
34
37
  * @returns The decrypted message
35
38
  */
36
39
  decrypt(ciphertext, privateKey, encapsulatedKey, tag, infoStr) {
37
- return hpkeDecrypt(ciphertext, privateKey, encapsulatedKey, tag, infoStr);
40
+ return (0, index_1.hpkeDecrypt)(ciphertext, privateKey, encapsulatedKey, tag, infoStr);
38
41
  }
39
42
  }
43
+ exports.HpkeWrapper = HpkeWrapper;
40
44
  //# sourceMappingURL=hpke.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hpke.js","sourceRoot":"","sources":["../../src-ts/hybrid/hpke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAmC,MAAM,gBAAgB,CAAA;AAEhI,MAAM,OAAO,WAAW;IAEpB;;;OAGG;IACI,eAAe;QAClB,OAAO,mBAAmB,EAAE,CAAC;IACjC,CAAC;IAED;;;OAGG;IACI,kBAAkB;QACrB,OAAO,eAAe,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;;OAMG;IACI,OAAO,CAAC,SAAmB,EAAE,SAAmB,EAAE,OAAiB;QACtE,OAAO,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;;;OAQG;IACI,OAAO,CAAC,UAAoB,EAAE,UAAoB,EAAE,eAAyB,EAAE,GAAa,EAAE,OAAiB;QAClH,OAAO,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACJ"}
1
+ {"version":3,"file":"hpke.js","sourceRoot":"","sources":["../../src-ts/hybrid/hpke.ts"],"names":[],"mappings":";;;AAAA,uCAA6H;AAE7H,MAAa,WAAW;IAEpB;;;OAGG;IACI,eAAe;QAClB,OAAO,IAAA,2BAAmB,GAAE,CAAC;IACjC,CAAC;IAED;;;OAGG;IACI,kBAAkB;QACrB,OAAO,IAAA,uBAAe,GAAE,CAAC;IAC7B,CAAC;IAED;;;;;;OAMG;IACI,OAAO,CAAC,SAAmB,EAAE,SAAmB,EAAE,OAAiB;QACtE,OAAO,IAAA,mBAAW,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;;;OAQG;IACI,OAAO,CAAC,UAAoB,EAAE,UAAoB,EAAE,eAAyB,EAAE,GAAa,EAAE,OAAiB;QAClH,OAAO,IAAA,mBAAW,EAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACJ;AAzCD,kCAyCC"}
@@ -1,3 +1,3 @@
1
- import { HpkeWrapper } from "./hpke.js";
1
+ import { HpkeWrapper } from "./hpke";
2
2
  export { HpkeWrapper };
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/hybrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/hybrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,3 +1,6 @@
1
- import { HpkeWrapper } from "./hpke.js";
2
- export { HpkeWrapper };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HpkeWrapper = void 0;
4
+ const hpke_1 = require("./hpke");
5
+ Object.defineProperty(exports, "HpkeWrapper", { enumerable: true, get: function () { return hpke_1.HpkeWrapper; } });
3
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/hybrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/hybrid/index.ts"],"names":[],"mappings":";;;AAAA,iCAAqC;AAE5B,4FAFA,kBAAW,OAEA"}
package/lib/index.d.ts CHANGED
@@ -1,42 +1,11 @@
1
- export * from "./password-hashers/index.js";
2
- export * from "./hashers/index.js";
3
- export * from "./key_exchange/index.js";
4
- export * from "./symmetric/index.js";
5
- export * from "./asymmetric/index.js";
6
- export * from "./digital-signature/index.js";
7
- export * from "./sponges/index.js";
8
- export * from "./message/index.js";
9
- export * from "./signature/index.js";
10
- export * from "./hybrid/index.js";
11
- export declare class CASED25519KeyPairResult {
12
- privateKey: Array<number>;
13
- publicKey: Array<number>;
14
- }
15
- export declare class CASRSADigitalSignatureResult {
16
- publicKey: string;
17
- privateKey: string;
18
- signature: Array<number>;
19
- }
20
- export declare class CASRSAKeyPairResult {
21
- privateKey: string;
22
- publicKey: string;
23
- }
24
- export declare class CASSHAED25519DalekDigitalSignatureResult {
25
- publicKey: Array<number>;
26
- signature: Array<number>;
27
- }
28
- export declare class CASx25519SecretPublicKeyResult {
29
- publicKey: Array<number>;
30
- secretKey: Array<number>;
31
- }
32
- export declare class HpkeEncryptResult {
33
- tag: Array<number>;
34
- ciphertext: Array<number>;
35
- encapsulatedKey: Array<number>;
36
- }
37
- export declare class HpkeKeyResult {
38
- publicKey: Array<number>;
39
- secretKey: Array<number>;
40
- infoStr: Array<number>;
41
- }
1
+ export * from "./password-hashers/index";
2
+ export * from "./hashers/index";
3
+ export * from "./key_exchange/index";
4
+ export * from "./symmetric/index";
5
+ export * from "./asymmetric/index";
6
+ export * from "./digital-signature";
7
+ export * from "./sponges/index";
8
+ export * from "./message/index";
9
+ export * from "./signature/index";
10
+ export * from "./hybrid/index";
42
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src-ts/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAElC,qBAAa,uBAAuB;IAClC,UAAU,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IAC1B,SAAS,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;CAC1B;AAED,qBAAa,4BAA4B;IACvC,SAAS,EAAG,MAAM,CAAA;IAClB,UAAU,EAAG,MAAM,CAAA;IACnB,SAAS,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;CAC1B;AAED,qBAAa,mBAAmB;IAC9B,UAAU,EAAG,MAAM,CAAA;IACnB,SAAS,EAAG,MAAM,CAAA;CACnB;AACD,qBAAa,wCAAwC;IACnD,SAAS,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IACzB,SAAS,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;CAC1B;AAED,qBAAa,8BAA8B;IACzC,SAAS,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IACzB,SAAS,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;CAC1B;AACD,qBAAa,iBAAiB;IAC5B,GAAG,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IACnB,UAAU,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IAC1B,eAAe,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;CAChC;AAED,qBAAa,aAAa;IACxB,SAAS,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IACzB,SAAS,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IACzB,OAAO,EAAG,KAAK,CAAC,MAAM,CAAC,CAAA;CACxB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src-ts/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
package/lib/index.js CHANGED
@@ -1,42 +1,27 @@
1
- export * from "./password-hashers/index.js";
2
- export * from "./hashers/index.js";
3
- export * from "./key_exchange/index.js";
4
- export * from "./symmetric/index.js";
5
- export * from "./asymmetric/index.js";
6
- export * from "./digital-signature/index.js";
7
- export * from "./sponges/index.js";
8
- export * from "./message/index.js";
9
- export * from "./signature/index.js";
10
- export * from "./hybrid/index.js";
11
- export class CASED25519KeyPairResult {
12
- privateKey;
13
- publicKey;
14
- }
15
- export class CASRSADigitalSignatureResult {
16
- publicKey;
17
- privateKey;
18
- signature;
19
- }
20
- export class CASRSAKeyPairResult {
21
- privateKey;
22
- publicKey;
23
- }
24
- export class CASSHAED25519DalekDigitalSignatureResult {
25
- publicKey;
26
- signature;
27
- }
28
- export class CASx25519SecretPublicKeyResult {
29
- publicKey;
30
- secretKey;
31
- }
32
- export class HpkeEncryptResult {
33
- tag;
34
- ciphertext;
35
- encapsulatedKey;
36
- }
37
- export class HpkeKeyResult {
38
- publicKey;
39
- secretKey;
40
- infoStr;
41
- }
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./password-hashers/index"), exports);
18
+ __exportStar(require("./hashers/index"), exports);
19
+ __exportStar(require("./key_exchange/index"), exports);
20
+ __exportStar(require("./symmetric/index"), exports);
21
+ __exportStar(require("./asymmetric/index"), exports);
22
+ __exportStar(require("./digital-signature"), exports);
23
+ __exportStar(require("./sponges/index"), exports);
24
+ __exportStar(require("./message/index"), exports);
25
+ __exportStar(require("./signature/index"), exports);
26
+ __exportStar(require("./hybrid/index"), exports);
42
27
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src-ts/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAElC,MAAM,OAAO,uBAAuB;IAClC,UAAU,CAAgB;IAC1B,SAAS,CAAgB;CAC1B;AAED,MAAM,OAAO,4BAA4B;IACvC,SAAS,CAAS;IAClB,UAAU,CAAS;IACnB,SAAS,CAAgB;CAC1B;AAED,MAAM,OAAO,mBAAmB;IAC9B,UAAU,CAAS;IACnB,SAAS,CAAS;CACnB;AACD,MAAM,OAAO,wCAAwC;IACnD,SAAS,CAAgB;IACzB,SAAS,CAAgB;CAC1B;AAED,MAAM,OAAO,8BAA8B;IACzC,SAAS,CAAgB;IACzB,SAAS,CAAgB;CAC1B;AACD,MAAM,OAAO,iBAAiB;IAC5B,GAAG,CAAgB;IACnB,UAAU,CAAgB;IAC1B,eAAe,CAAgB;CAChC;AAED,MAAM,OAAO,aAAa;IACxB,SAAS,CAAgB;IACzB,SAAS,CAAgB;IACzB,OAAO,CAAgB;CACxB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src-ts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,kDAAgC;AAChC,uDAAqC;AACrC,oDAAkC;AAClC,qDAAmC;AACnC,sDAAoC;AACpC,kDAAgC;AAChC,kDAAgC;AAChC,oDAAkC;AAClC,iDAA+B"}
@@ -1,4 +1,4 @@
1
- import { CASx25519SecretPublicKeyResult } from "../index.js";
2
- import { X25519Wrapper } from "./x25519.js";
1
+ import { CASx25519SecretPublicKeyResult } from "../../index";
2
+ import { X25519Wrapper } from "./x25519";
3
3
  export { X25519Wrapper, CASx25519SecretPublicKeyResult };
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/key_exchange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,8BAA8B,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/key_exchange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,8BAA8B,EAAE,CAAC"}
@@ -1,4 +1,6 @@
1
- import { CASx25519SecretPublicKeyResult } from "../index.js";
2
- import { X25519Wrapper } from "./x25519.js";
3
- export { X25519Wrapper, CASx25519SecretPublicKeyResult };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.X25519Wrapper = void 0;
4
+ const x25519_1 = require("./x25519");
5
+ Object.defineProperty(exports, "X25519Wrapper", { enumerable: true, get: function () { return x25519_1.X25519Wrapper; } });
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/key_exchange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,8BAA8B,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/key_exchange/index.ts"],"names":[],"mappings":";;;AACA,qCAAyC;AAEhC,8FAFA,sBAAa,OAEA"}
@@ -1,4 +1,4 @@
1
- import { CASx25519SecretPublicKeyResult } from "../../index.js";
1
+ import { CASx25519SecretPublicKeyResult } from "../../index";
2
2
  export declare class X25519Wrapper {
3
3
  /**
4
4
  * Generates and secret and public key to be used to create a shared secret with Diffie Hellman.
@@ -1 +1 @@
1
- {"version":3,"file":"x25519.d.ts","sourceRoot":"","sources":["../../src-ts/key_exchange/x25519.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAyD,MAAM,gBAAgB,CAAA;AAEtH,qBAAa,aAAa;IACtB;;;;OAIG;IACI,0BAA0B,IAAI,8BAA8B;IAInE;;;;;;OAMG;IACI,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;CAGjG"}
1
+ {"version":3,"file":"x25519.d.ts","sourceRoot":"","sources":["../../src-ts/key_exchange/x25519.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAyD,MAAM,aAAa,CAAA;AAEnH,qBAAa,aAAa;IACtB;;;;OAIG;IACI,0BAA0B,IAAI,8BAA8B;IAInE;;;;;;OAMG;IACI,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;CAGjG"}
@@ -1,12 +1,15 @@
1
- import { x25519DiffieHellman, x25519GenerateSecretAndPublicKey } from "../../index.js";
2
- export class X25519Wrapper {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.X25519Wrapper = void 0;
4
+ const index_1 = require("../../index");
5
+ class X25519Wrapper {
3
6
  /**
4
7
  * Generates and secret and public key to be used to create a shared secret with Diffie Hellman.
5
8
  * User should share their public key with the other user and take the other user's public key and they can generate a Shared Secret.
6
9
  * @returns X25519SecretPublicKeyResult
7
10
  */
8
11
  generateSecretAndPublicKey() {
9
- return x25519GenerateSecretAndPublicKey();
12
+ return (0, index_1.x25519GenerateSecretAndPublicKey)();
10
13
  }
11
14
  /**
12
15
  * User takes their secret key and the other user's public key to generate a shared secret.
@@ -16,7 +19,8 @@ export class X25519Wrapper {
16
19
  * @returns Array<number>
17
20
  */
18
21
  generateSharedSecret(secretKey, publicKey) {
19
- return x25519DiffieHellman(secretKey, publicKey);
22
+ return (0, index_1.x25519DiffieHellman)(secretKey, publicKey);
20
23
  }
21
24
  }
25
+ exports.X25519Wrapper = X25519Wrapper;
22
26
  //# sourceMappingURL=x25519.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x25519.js","sourceRoot":"","sources":["../../src-ts/key_exchange/x25519.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,mBAAmB,EAAE,gCAAgC,EAAE,MAAM,gBAAgB,CAAA;AAEtH,MAAM,OAAO,aAAa;IACtB;;;;OAIG;IACI,0BAA0B;QAC7B,OAAO,gCAAgC,EAAE,CAAC;IAC9C,CAAC;IAED;;;;;;OAMG;IACI,oBAAoB,CAAC,SAAwB,EAAE,SAAwB;QAC1E,OAAO,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;CACJ"}
1
+ {"version":3,"file":"x25519.js","sourceRoot":"","sources":["../../src-ts/key_exchange/x25519.ts"],"names":[],"mappings":";;;AAAA,uCAAmH;AAEnH,MAAa,aAAa;IACtB;;;;OAIG;IACI,0BAA0B;QAC7B,OAAO,IAAA,wCAAgC,GAAE,CAAC;IAC9C,CAAC;IAED;;;;;;OAMG;IACI,oBAAoB,CAAC,SAAwB,EAAE,SAAwB;QAC1E,OAAO,IAAA,2BAAmB,EAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;CACJ;AApBD,sCAoBC"}