cas-typescript-sdk 1.0.54 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +6 -0
- package/index.darwin-x64.node +0 -0
- package/index.js +55 -52
- package/index.linux-x64-gnu.node +0 -0
- package/index.linux-x64-musl.node +0 -0
- package/index.win32-x64-msvc.node +0 -0
- package/lib/asymmetric/RSAWrapper.d.ts +1 -1
- package/lib/asymmetric/RSAWrapper.d.ts.map +1 -1
- package/lib/asymmetric/RSAWrapper.js +25 -5
- package/lib/asymmetric/RSAWrapper.js.map +1 -1
- package/lib/asymmetric/index.d.ts +3 -2
- package/lib/asymmetric/index.d.ts.map +1 -1
- package/lib/asymmetric/index.js +5 -2
- package/lib/asymmetric/index.js.map +1 -1
- package/lib/cas-configuration.d.ts +20 -0
- package/lib/cas-configuration.d.ts.map +1 -0
- package/lib/cas-configuration.js +44 -0
- package/lib/cas-configuration.js.map +1 -0
- package/lib/decorators/benchmark-method.d.ts +2 -0
- package/lib/decorators/benchmark-method.d.ts.map +1 -0
- package/lib/decorators/benchmark-method.js +29 -0
- package/lib/decorators/benchmark-method.js.map +1 -0
- package/lib/digital-signature/digital-siganture-sha-512.d.ts +2 -2
- package/lib/digital-signature/digital-siganture-sha-512.d.ts.map +1 -1
- package/lib/digital-signature/digital-siganture-sha-512.js +18 -4
- package/lib/digital-signature/digital-siganture-sha-512.js.map +1 -1
- package/lib/digital-signature/digital-signature-base.d.ts +1 -1
- package/lib/digital-signature/digital-signature-base.d.ts.map +1 -1
- package/lib/digital-signature/digital-signature-base.js +2 -1
- package/lib/digital-signature/digital-signature-factory.d.ts +1 -1
- package/lib/digital-signature/digital-signature-factory.d.ts.map +1 -1
- package/lib/digital-signature/digital-signature-factory.js +11 -7
- package/lib/digital-signature/digital-signature-factory.js.map +1 -1
- package/lib/digital-signature/digital-signaturte-sha-256.d.ts +4 -4
- package/lib/digital-signature/digital-signaturte-sha-256.d.ts.map +1 -1
- package/lib/digital-signature/digital-signaturte-sha-256.js +23 -6
- package/lib/digital-signature/digital-signaturte-sha-256.js.map +1 -1
- package/lib/digital-signature/index.d.ts +5 -5
- package/lib/digital-signature/index.d.ts.map +1 -1
- package/lib/digital-signature/index.js +11 -6
- package/lib/digital-signature/index.js.map +1 -1
- package/lib/hashers/blake2-wrapper.d.ts +1 -1
- package/lib/hashers/blake2-wrapper.d.ts.map +1 -1
- package/lib/hashers/blake2-wrapper.js +29 -6
- package/lib/hashers/blake2-wrapper.js.map +1 -1
- package/lib/hashers/hasher-base.js +2 -1
- package/lib/hashers/hasher-factory.d.ts +1 -1
- package/lib/hashers/hasher-factory.d.ts.map +1 -1
- package/lib/hashers/hasher-factory.js +11 -7
- package/lib/hashers/hasher-factory.js.map +1 -1
- package/lib/hashers/hasher-type.js +5 -2
- package/lib/hashers/hasher-type.js.map +1 -1
- package/lib/hashers/index.d.ts +4 -4
- package/lib/hashers/index.d.ts.map +1 -1
- package/lib/hashers/index.js +11 -5
- package/lib/hashers/index.js.map +1 -1
- package/lib/hashers/sha-wrapper.d.ts +1 -1
- package/lib/hashers/sha-wrapper.d.ts.map +1 -1
- package/lib/hashers/sha-wrapper.js +29 -6
- package/lib/hashers/sha-wrapper.js.map +1 -1
- package/lib/http/http-wrapper.d.ts +6 -0
- package/lib/http/http-wrapper.d.ts.map +1 -0
- package/lib/http/http-wrapper.js +30 -0
- package/lib/http/http-wrapper.js.map +1 -0
- package/lib/hybrid/hpke.d.ts +1 -1
- package/lib/hybrid/hpke.d.ts.map +1 -1
- package/lib/hybrid/hpke.js +29 -6
- package/lib/hybrid/hpke.js.map +1 -1
- package/lib/hybrid/index.d.ts +1 -1
- package/lib/hybrid/index.d.ts.map +1 -1
- package/lib/hybrid/index.js +5 -2
- package/lib/hybrid/index.js.map +1 -1
- package/lib/index.d.ts +12 -41
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +32 -41
- package/lib/index.js.map +1 -1
- package/lib/key_exchange/index.d.ts +2 -2
- package/lib/key_exchange/index.d.ts.map +1 -1
- package/lib/key_exchange/index.js +5 -3
- package/lib/key_exchange/index.js.map +1 -1
- package/lib/key_exchange/x25519.d.ts +1 -1
- package/lib/key_exchange/x25519.d.ts.map +1 -1
- package/lib/key_exchange/x25519.js +21 -4
- package/lib/key_exchange/x25519.js.map +1 -1
- package/lib/message/hmac.d.ts.map +1 -1
- package/lib/message/hmac.js +21 -4
- package/lib/message/hmac.js.map +1 -1
- package/lib/message/index.d.ts +1 -1
- package/lib/message/index.d.ts.map +1 -1
- package/lib/message/index.js +5 -2
- package/lib/message/index.js.map +1 -1
- package/lib/password-hashers/argon2-wrapper.d.ts +1 -1
- package/lib/password-hashers/argon2-wrapper.d.ts.map +1 -1
- package/lib/password-hashers/argon2-wrapper.js +22 -5
- package/lib/password-hashers/argon2-wrapper.js.map +1 -1
- package/lib/password-hashers/bcrypt-wrapper.d.ts +1 -1
- package/lib/password-hashers/bcrypt-wrapper.d.ts.map +1 -1
- package/lib/password-hashers/bcrypt-wrapper.js +25 -5
- package/lib/password-hashers/bcrypt-wrapper.js.map +1 -1
- package/lib/password-hashers/index.d.ts +5 -5
- package/lib/password-hashers/index.d.ts.map +1 -1
- package/lib/password-hashers/index.js +13 -6
- package/lib/password-hashers/index.js.map +1 -1
- package/lib/password-hashers/password-hasher-base.js +2 -1
- package/lib/password-hashers/password-hasher-factory.d.ts +1 -1
- package/lib/password-hashers/password-hasher-factory.d.ts.map +1 -1
- package/lib/password-hashers/password-hasher-factory.js +14 -10
- package/lib/password-hashers/password-hasher-factory.js.map +1 -1
- package/lib/password-hashers/password-hasher-type.js +5 -2
- package/lib/password-hashers/password-hasher-type.js.map +1 -1
- package/lib/password-hashers/scrypt-wrapper.d.ts +1 -1
- package/lib/password-hashers/scrypt-wrapper.d.ts.map +1 -1
- package/lib/password-hashers/scrypt-wrapper.js +25 -5
- package/lib/password-hashers/scrypt-wrapper.js.map +1 -1
- package/lib/signature/ed25519-wrapper.d.ts +2 -2
- package/lib/signature/ed25519-wrapper.d.ts.map +1 -1
- package/lib/signature/ed25519-wrapper.js +25 -5
- package/lib/signature/ed25519-wrapper.js.map +1 -1
- package/lib/signature/index.d.ts +1 -1
- package/lib/signature/index.d.ts.map +1 -1
- package/lib/signature/index.js +5 -2
- package/lib/signature/index.js.map +1 -1
- package/lib/sponges/ascon-wrapper.d.ts.map +1 -1
- package/lib/sponges/ascon-wrapper.js +29 -6
- package/lib/sponges/ascon-wrapper.js.map +1 -1
- package/lib/sponges/index.d.ts +1 -1
- package/lib/sponges/index.d.ts.map +1 -1
- package/lib/sponges/index.js +5 -2
- package/lib/sponges/index.js.map +1 -1
- package/lib/symmetric/aes-wrapper.d.ts.map +1 -1
- package/lib/symmetric/aes-wrapper.js +49 -11
- package/lib/symmetric/aes-wrapper.js.map +1 -1
- package/lib/symmetric/index.d.ts +1 -1
- package/lib/symmetric/index.d.ts.map +1 -1
- package/lib/symmetric/index.js +5 -2
- package/lib/symmetric/index.js.map +1 -1
- package/package.json +2 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signature-base.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"digital-signature-base.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAA4C,MAAM,aAAa,CAAC;AAErG,MAAM,WAAW,iBAAiB;IAC9B,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,4BAA4B,CAAC;IAC3F,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;CACnG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signature-factory.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"digital-signature-factory.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAG5E,oBAAY,oBAAoB;IAC5B,MAAM,IAAI;IACV,MAAM,IAAI;CACb;AAED,qBAAa,uBAAuB;IAEhC;;;;OAIG;WACW,GAAG,CAAC,IAAI,EAAE,oBAAoB;CAS/C"}
|
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DigitalSignatureFactory = exports.DigitalSignatureType = void 0;
|
|
4
|
+
const digital_siganture_sha_512_1 = require("./digital-siganture-sha-512");
|
|
5
|
+
const digital_signaturte_sha_256_1 = require("./digital-signaturte-sha-256");
|
|
6
|
+
var DigitalSignatureType;
|
|
4
7
|
(function (DigitalSignatureType) {
|
|
5
8
|
DigitalSignatureType[DigitalSignatureType["SHA512"] = 1] = "SHA512";
|
|
6
9
|
DigitalSignatureType[DigitalSignatureType["SHA256"] = 2] = "SHA256";
|
|
7
|
-
})(DigitalSignatureType || (DigitalSignatureType = {}));
|
|
8
|
-
|
|
10
|
+
})(DigitalSignatureType || (exports.DigitalSignatureType = DigitalSignatureType = {}));
|
|
11
|
+
class DigitalSignatureFactory {
|
|
9
12
|
/**
|
|
10
13
|
* Get the appropriate digital signature wrapper based upon the type passed in.
|
|
11
14
|
* @param type
|
|
12
15
|
* @returns
|
|
13
16
|
*/
|
|
14
17
|
static get(type) {
|
|
15
|
-
let ds = new DigitalSignatureSHA512Wrapper();
|
|
18
|
+
let ds = new digital_siganture_sha_512_1.DigitalSignatureSHA512Wrapper();
|
|
16
19
|
switch (type) {
|
|
17
20
|
case DigitalSignatureType.SHA256:
|
|
18
|
-
ds = new DigitalSignatureSHA256Wrapper();
|
|
21
|
+
ds = new digital_signaturte_sha_256_1.DigitalSignatureSHA256Wrapper();
|
|
19
22
|
break;
|
|
20
23
|
}
|
|
21
24
|
return ds;
|
|
22
25
|
}
|
|
23
26
|
}
|
|
27
|
+
exports.DigitalSignatureFactory = DigitalSignatureFactory;
|
|
24
28
|
//# sourceMappingURL=digital-signature-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signature-factory.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-factory.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"digital-signature-factory.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-factory.ts"],"names":[],"mappings":";;;AAAA,2EAA4E;AAC5E,6EAA6E;AAE7E,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,mEAAU,CAAA;IACV,mEAAU,CAAA;AACd,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B;AAED,MAAa,uBAAuB;IAEhC;;;;OAIG;IACI,MAAM,CAAC,GAAG,CAAC,IAA0B;QACxC,IAAI,EAAE,GAAG,IAAI,yDAA6B,EAAE,CAAC;QAC7C,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,oBAAoB,CAAC,MAAM;gBAC5B,EAAE,GAAG,IAAI,0DAA6B,EAAE,CAAC;gBACzC,MAAM;QACd,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAhBD,0DAgBC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CASRSADigitalSignatureResult } from "
|
|
2
|
-
import { IDigitalSignature } from "./digital-signature-base
|
|
1
|
+
import { CASRSADigitalSignatureResult } from "../../index";
|
|
2
|
+
import { IDigitalSignature } from "./digital-signature-base";
|
|
3
3
|
export declare class DigitalSignatureSHA256Wrapper implements IDigitalSignature {
|
|
4
4
|
/**
|
|
5
|
-
* Generates and RSA digital signature with SHA3-
|
|
5
|
+
* Generates and RSA digital signature with SHA3-512
|
|
6
6
|
* @param rsa_key_size
|
|
7
7
|
* @param data_to_sign
|
|
8
|
-
* @returns
|
|
8
|
+
* @returns RsaDigitalSignatureResult
|
|
9
9
|
*/
|
|
10
10
|
createRsa(rsa_key_size: number, data_to_sign: number[]): CASRSADigitalSignatureResult;
|
|
11
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signaturte-sha-256.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signaturte-sha-256.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"digital-signaturte-sha-256.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signaturte-sha-256.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAA8D,MAAM,aAAa,CAAC;AAEvH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,qBAAa,6BAA8B,YAAW,iBAAiB;IAEnE;;;;;OAKG;IAEH,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,4BAA4B;IAUrF;;;;;;OAMG;IAEH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO;CAYxF"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DigitalSignatureSHA256Wrapper = void 0;
|
|
10
|
+
const index_1 = require("../../index");
|
|
11
|
+
const benchmark_method_1 = require("../decorators/benchmark-method");
|
|
12
|
+
class DigitalSignatureSHA256Wrapper {
|
|
3
13
|
/**
|
|
4
|
-
* Generates and RSA digital signature with SHA3-
|
|
14
|
+
* Generates and RSA digital signature with SHA3-512
|
|
5
15
|
* @param rsa_key_size
|
|
6
16
|
* @param data_to_sign
|
|
7
|
-
* @returns
|
|
17
|
+
* @returns RsaDigitalSignatureResult
|
|
8
18
|
*/
|
|
9
19
|
createRsa(rsa_key_size, data_to_sign) {
|
|
10
20
|
if (rsa_key_size !== 1024 && rsa_key_size !== 2048 && rsa_key_size !== 4096) {
|
|
@@ -13,7 +23,7 @@ export class DigitalSignatureSHA256Wrapper {
|
|
|
13
23
|
if (data_to_sign?.length === 0) {
|
|
14
24
|
throw new Error("Must provide allocated data to sign");
|
|
15
25
|
}
|
|
16
|
-
return sha256RsaDigitalSignature(rsa_key_size, data_to_sign);
|
|
26
|
+
return (0, index_1.sha256RsaDigitalSignature)(rsa_key_size, data_to_sign);
|
|
17
27
|
}
|
|
18
28
|
/**
|
|
19
29
|
* Verifies a digital signature created with the RSA public key.
|
|
@@ -32,7 +42,14 @@ export class DigitalSignatureSHA256Wrapper {
|
|
|
32
42
|
if (signature?.length === 0) {
|
|
33
43
|
throw new Error("Must provide an allocated signature");
|
|
34
44
|
}
|
|
35
|
-
return sha256RsaVerifyDigitalSignature(public_key, data_to_verify, signature);
|
|
45
|
+
return (0, index_1.sha256RsaVerifyDigitalSignature)(public_key, data_to_verify, signature);
|
|
36
46
|
}
|
|
37
47
|
}
|
|
48
|
+
exports.DigitalSignatureSHA256Wrapper = DigitalSignatureSHA256Wrapper;
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
51
|
+
], DigitalSignatureSHA256Wrapper.prototype, "createRsa", null);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
54
|
+
], DigitalSignatureSHA256Wrapper.prototype, "verifyRSa", null);
|
|
38
55
|
//# sourceMappingURL=digital-signaturte-sha-256.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signaturte-sha-256.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signaturte-sha-256.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"digital-signaturte-sha-256.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signaturte-sha-256.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuH;AACvH,qEAAiE;AAGjE,MAAa,6BAA6B;IAEtC;;;;;OAKG;IAEH,SAAS,CAAC,YAAoB,EAAE,YAAsB;QAClD,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;YAC1E,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACxE,CAAC;QACD,IAAI,YAAY,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAA,iCAAyB,EAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;OAMG;IAEH,SAAS,CAAC,UAAkB,EAAE,cAAwB,EAAE,SAAmB;QACvE,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,cAAc,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChE,CAAC;QACD,IAAI,SAAS,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAA,uCAA+B,EAAC,UAAU,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IAClF,CAAC;CACJ;AAvCD,sEAuCC;AA9BG;IADC,IAAA,kCAAe,GAAE;8DASjB;AAUD;IADC,IAAA,kCAAe,GAAE;8DAYjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DigitalSignatureType } from "./digital-signature-factory
|
|
2
|
-
import { DigitalSignatureFactory } from "./digital-signature-factory
|
|
3
|
-
import { DigitalSignatureSHA256Wrapper } from "./digital-signaturte-sha-256
|
|
4
|
-
import { DigitalSignatureSHA512Wrapper } from "./digital-siganture-sha-512
|
|
5
|
-
import { CASRSADigitalSignatureResult, CASSHAED25519DalekDigitalSignatureResult } from "
|
|
1
|
+
import { DigitalSignatureType } from "./digital-signature-factory";
|
|
2
|
+
import { DigitalSignatureFactory } from "./digital-signature-factory";
|
|
3
|
+
import { DigitalSignatureSHA256Wrapper } from "./digital-signaturte-sha-256";
|
|
4
|
+
import { DigitalSignatureSHA512Wrapper } from "./digital-siganture-sha-512";
|
|
5
|
+
import { CASRSADigitalSignatureResult, CASSHAED25519DalekDigitalSignatureResult } from "../../index";
|
|
6
6
|
export { DigitalSignatureFactory, DigitalSignatureSHA256Wrapper, DigitalSignatureSHA512Wrapper, DigitalSignatureType, CASSHAED25519DalekDigitalSignatureResult, CASRSADigitalSignatureResult };
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,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,7 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blake2-wrapper.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/blake2-wrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blake2-wrapper.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/blake2-wrapper.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,aAAc,YAAW,WAAW;IAC/C;;;;OAIG;IAEH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAIvC;;;;;OAKG;IAEH,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;IAEH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;CAGjE"}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Blake2Wrapper = void 0;
|
|
10
|
+
const index_1 = require("../../index");
|
|
11
|
+
const benchmark_method_1 = require("../decorators/benchmark-method");
|
|
12
|
+
class Blake2Wrapper {
|
|
3
13
|
/**
|
|
4
14
|
* Hashes the input data using Blake2b 512
|
|
5
15
|
* @param dataToHash The data to hash
|
|
6
16
|
* @returns The hashed output
|
|
7
17
|
*/
|
|
8
18
|
hash512(dataToHash) {
|
|
9
|
-
return blake2Sha512(dataToHash);
|
|
19
|
+
return (0, index_1.blake2Sha512)(dataToHash);
|
|
10
20
|
}
|
|
11
21
|
/**
|
|
12
22
|
* Verifies the input data against the hashed output using Blake2b 512
|
|
@@ -15,7 +25,7 @@ export class Blake2Wrapper {
|
|
|
15
25
|
* @returns True if the verification is successful, false otherwise
|
|
16
26
|
*/
|
|
17
27
|
verify512(dataToHash, dataToVerify) {
|
|
18
|
-
return blake2Sha512Verify(dataToHash, dataToVerify);
|
|
28
|
+
return (0, index_1.blake2Sha512Verify)(dataToHash, dataToVerify);
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
21
31
|
* Hashes the input data using Blake2b 256
|
|
@@ -23,7 +33,7 @@ export class Blake2Wrapper {
|
|
|
23
33
|
* @returns The hashed output
|
|
24
34
|
*/
|
|
25
35
|
hash256(dataToHash) {
|
|
26
|
-
return blake2Sha256(dataToHash);
|
|
36
|
+
return (0, index_1.blake2Sha256)(dataToHash);
|
|
27
37
|
}
|
|
28
38
|
/**
|
|
29
39
|
* Verifies the input data against the hashed output using Blake2b 256
|
|
@@ -32,7 +42,20 @@ export class Blake2Wrapper {
|
|
|
32
42
|
* @returns True if the verification is successful, false otherwise
|
|
33
43
|
*/
|
|
34
44
|
verify256(dataToHash, dataToVerify) {
|
|
35
|
-
return blake2Sha256Verify(dataToHash, dataToVerify);
|
|
45
|
+
return (0, index_1.blake2Sha256Verify)(dataToHash, dataToVerify);
|
|
36
46
|
}
|
|
37
47
|
}
|
|
48
|
+
exports.Blake2Wrapper = Blake2Wrapper;
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
51
|
+
], Blake2Wrapper.prototype, "hash512", null);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
54
|
+
], Blake2Wrapper.prototype, "verify512", null);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
57
|
+
], Blake2Wrapper.prototype, "hash256", null);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
60
|
+
], Blake2Wrapper.prototype, "verify256", null);
|
|
38
61
|
//# 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,
|
|
1
|
+
{"version":3,"file":"blake2-wrapper.js","sourceRoot":"","sources":["../../src-ts/hashers/blake2-wrapper.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAKqB;AACrB,qEAAiE;AAGjE,MAAa,aAAa;IACxB;;;;OAIG;IAEH,OAAO,CAAC,UAAoB;QAC1B,OAAO,IAAA,oBAAY,EAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IAEH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QACpD,OAAO,IAAA,0BAAkB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACtD,CAAC;IACD;;;;OAIG;IAEH,OAAO,CAAC,UAAoB;QAC1B,OAAO,IAAA,oBAAY,EAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IAEH,SAAS,CAAC,UAAoB,EAAE,YAAsB;QACpD,OAAO,IAAA,0BAAkB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACtD,CAAC;CACF;AAzCD,sCAyCC;AAlCC;IADC,IAAA,kCAAe,GAAE;4CAGjB;AASD;IADC,IAAA,kCAAe,GAAE;8CAGjB;AAOD;IADC,IAAA,kCAAe,GAAE;4CAGjB;AASD;IADC,IAAA,kCAAe,GAAE;8CAGjB"}
|
|
@@ -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,
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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"}
|
package/lib/hashers/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HasherFactory } from "./hasher-factory
|
|
2
|
-
import { HasherType } from "./hasher-type
|
|
3
|
-
import { SHAWrapper } from "./sha-wrapper
|
|
4
|
-
import { Blake2Wrapper } from "./blake2-wrapper
|
|
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,
|
|
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"}
|
package/lib/hashers/index.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
package/lib/hashers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/hashers/index.ts"],"names":[],"mappings":"AAAA,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sha-wrapper.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/sha-wrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sha-wrapper.d.ts","sourceRoot":"","sources":["../../src-ts/hashers/sha-wrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,UAAW,YAAW,WAAW;IAC1C;;;;OAIG;IAEH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAOvC;;;;;OAKG;IAEH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;IAUhE;;;;OAIG;IAEH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAOvC;;;;;OAKG;IAEH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO;CASnE"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SHAWrapper = void 0;
|
|
10
|
+
const index_1 = require("../../index");
|
|
11
|
+
const benchmark_method_1 = require("../decorators/benchmark-method");
|
|
12
|
+
class SHAWrapper {
|
|
3
13
|
/**
|
|
4
14
|
* Hashes a byte array with SHA3-512.
|
|
5
15
|
* @param dataToHash
|
|
@@ -9,7 +19,7 @@ export class SHAWrapper {
|
|
|
9
19
|
if (!dataToHash || dataToHash.length === 0) {
|
|
10
20
|
throw new Error("You must provide an allocated array of data");
|
|
11
21
|
}
|
|
12
|
-
return sha512(dataToHash);
|
|
22
|
+
return (0, index_1.sha512)(dataToHash);
|
|
13
23
|
}
|
|
14
24
|
/**
|
|
15
25
|
* Verifies unsigned data against an SHA3-512 hash.
|
|
@@ -24,7 +34,7 @@ export class SHAWrapper {
|
|
|
24
34
|
if (!dataToVerify || dataToVerify.length === 0) {
|
|
25
35
|
throw new Error("You must provide an allocated array of data to verify");
|
|
26
36
|
}
|
|
27
|
-
return sha512Verify(dataToHash, dataToVerify);
|
|
37
|
+
return (0, index_1.sha512Verify)(dataToHash, dataToVerify);
|
|
28
38
|
}
|
|
29
39
|
/**
|
|
30
40
|
* Hashes a byte array with SHA3-256.
|
|
@@ -35,7 +45,7 @@ export class SHAWrapper {
|
|
|
35
45
|
if (!dataToHash || dataToHash.length === 0) {
|
|
36
46
|
throw new Error("You must provide an allocated array of data");
|
|
37
47
|
}
|
|
38
|
-
return sha256(dataToHash);
|
|
48
|
+
return (0, index_1.sha256)(dataToHash);
|
|
39
49
|
}
|
|
40
50
|
/**
|
|
41
51
|
* Verifies unsigned data against an SHA3-256 hash.
|
|
@@ -50,7 +60,20 @@ export class SHAWrapper {
|
|
|
50
60
|
if (!dataToVerify || dataToVerify.length === 0) {
|
|
51
61
|
throw new Error("You must provide an allocated array of data to verify");
|
|
52
62
|
}
|
|
53
|
-
return sha256Verify(dataToHash, dataToVerify);
|
|
63
|
+
return (0, index_1.sha256Verify)(dataToHash, dataToVerify);
|
|
54
64
|
}
|
|
55
65
|
}
|
|
66
|
+
exports.SHAWrapper = SHAWrapper;
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
69
|
+
], SHAWrapper.prototype, "hash512", null);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
72
|
+
], SHAWrapper.prototype, "verify512", null);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
75
|
+
], SHAWrapper.prototype, "hash256", null);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, benchmark_method_1.benchmarkMethod)()
|
|
78
|
+
], SHAWrapper.prototype, "verify256", null);
|
|
56
79
|
//# 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,
|
|
1
|
+
{"version":3,"file":"sha-wrapper.js","sourceRoot":"","sources":["../../src-ts/hashers/sha-wrapper.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAyE;AACzE,qEAAiE;AAGjE,MAAa,UAAU;IACnB;;;;OAIG;IAEH,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;IAEH,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;IAEH,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;IAEH,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;AA5DD,gCA4DC;AArDG;IADC,IAAA,kCAAe,GAAE;yCAMjB;AASD;IADC,IAAA,kCAAe,GAAE;2CASjB;AAQD;IADC,IAAA,kCAAe,GAAE;yCAMjB;AASD;IADC,IAAA,kCAAe,GAAE;2CASjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-wrapper.d.ts","sourceRoot":"","sources":["../../src-ts/http/http-wrapper.ts"],"names":[],"mappings":"AAGA,qBAAa,WAAW;WACN,UAAU,CAAC,OAAO,EAAE,MAAM;WAO1B,SAAS,CAAC,MAAM,EAAE,MAAM;WAWxB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAMtF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpWrapper = void 0;
|
|
4
|
+
const index_1 = require("../../index");
|
|
5
|
+
class HttpWrapper {
|
|
6
|
+
static setBaseUrl(baseUrl) {
|
|
7
|
+
if (!baseUrl) {
|
|
8
|
+
throw new Error("Base URL must be a allocated string.");
|
|
9
|
+
}
|
|
10
|
+
(0, index_1.setBaseUrl)(baseUrl);
|
|
11
|
+
}
|
|
12
|
+
static setApiKey(apiKey) {
|
|
13
|
+
if (!apiKey) {
|
|
14
|
+
throw new Error("API key must be a allocated string.");
|
|
15
|
+
}
|
|
16
|
+
const result = (0, index_1.setApiKey)(apiKey);
|
|
17
|
+
console.log(`Hell yes, ${result}`);
|
|
18
|
+
if (!result) {
|
|
19
|
+
throw new Error("Failed to set API key.");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
static sendBenchmark(timespan, className, methodName) {
|
|
23
|
+
if (!timespan || !className || !methodName) {
|
|
24
|
+
throw new Error("Timespan, class name, and method name must be provided.");
|
|
25
|
+
}
|
|
26
|
+
(0, index_1.sendBenchmarkToApi)(timespan, className, methodName);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.HttpWrapper = HttpWrapper;
|
|
30
|
+
//# sourceMappingURL=http-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-wrapper.js","sourceRoot":"","sources":["../../src-ts/http/http-wrapper.ts"],"names":[],"mappings":";;;AAAA,uCAAwE;AAGxE,MAAa,WAAW;IACb,MAAM,CAAC,UAAU,CAAC,OAAe;QACpC,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC5D,CAAC;QACD,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,MAAc;QAClC,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;QACD,MAAM,MAAM,GAAG,IAAA,iBAAS,EAAC,MAAM,CAAC,CAAC;QACjC,OAAO,CAAC,GAAG,CAAC,aAAa,MAAM,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC9C,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,QAAgB,EAAE,SAAiB,EAAE,UAAkB;QAC/E,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,CAAC,UAAU,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAC/E,CAAC;QACD,IAAA,0BAAkB,EAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACxD,CAAC;CACJ;AAzBD,kCAyBC"}
|
package/lib/hybrid/hpke.d.ts
CHANGED
package/lib/hybrid/hpke.d.ts.map
CHANGED
|
@@ -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,
|
|
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;AAG7H,qBAAa,WAAW;IAEpB;;;OAGG;IAEI,eAAe,IAAI,aAAa;IAIvC;;;OAGG;IAEI,kBAAkB,IAAI,MAAM,EAAE;IAIrC;;;;;;OAMG;IAEI,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,iBAAiB;IAI9F;;;;;;;;OAQG;IAEI,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"}
|