mol_crypto_lib 0.1.1080 → 0.1.1081
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/node.d.ts +4 -4
- package/node.js +6 -6
- package/node.js.map +1 -1
- package/node.mjs +6 -6
- package/node.test.js +6 -6
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +4 -4
- package/web.js +6 -6
- package/web.js.map +1 -1
- package/web.mjs +6 -6
package/node.d.ts
CHANGED
@@ -431,9 +431,9 @@ declare namespace $ {
|
|
431
431
|
static generate(): Promise<$mol_crypto_secret>;
|
432
432
|
static from(serial: BufferSource | string): Promise<$mol_crypto_secret>;
|
433
433
|
static derive(private_serial: string, public_serial: string): Promise<$mol_crypto_secret>;
|
434
|
-
serial(): Promise<
|
435
|
-
encrypt(open: BufferSource, salt: BufferSource): Promise<
|
436
|
-
decrypt(closed: BufferSource, salt: BufferSource): Promise<
|
434
|
+
serial(): Promise<Uint8Array>;
|
435
|
+
encrypt(open: BufferSource, salt: BufferSource): Promise<Uint8Array>;
|
436
|
+
decrypt(closed: BufferSource, salt: BufferSource): Promise<Uint8Array>;
|
437
437
|
}
|
438
438
|
}
|
439
439
|
|
@@ -534,7 +534,7 @@ declare namespace $ {
|
|
534
534
|
static generate(): Promise<$mol_crypto_key_private>;
|
535
535
|
native(): Promise<CryptoKey>;
|
536
536
|
public(): $mol_crypto_key_public;
|
537
|
-
sign(data: BufferSource): Promise<
|
537
|
+
sign(data: BufferSource): Promise<Uint8Array>;
|
538
538
|
}
|
539
539
|
}
|
540
540
|
|
package/node.js
CHANGED
@@ -1787,19 +1787,19 @@ var $;
|
|
1787
1787
|
return new this(secret);
|
1788
1788
|
}
|
1789
1789
|
async serial() {
|
1790
|
-
return await $mol_crypto_native.subtle.exportKey('raw', this.native);
|
1790
|
+
return new Uint8Array(await $mol_crypto_native.subtle.exportKey('raw', this.native));
|
1791
1791
|
}
|
1792
1792
|
async encrypt(open, salt) {
|
1793
|
-
return await $mol_crypto_native.subtle.encrypt({
|
1793
|
+
return new Uint8Array(await $mol_crypto_native.subtle.encrypt({
|
1794
1794
|
...algorithm,
|
1795
1795
|
iv: salt,
|
1796
|
-
}, this.native, open);
|
1796
|
+
}, this.native, open));
|
1797
1797
|
}
|
1798
1798
|
async decrypt(closed, salt) {
|
1799
|
-
return await $mol_crypto_native.subtle.decrypt({
|
1799
|
+
return new Uint8Array(await $mol_crypto_native.subtle.decrypt({
|
1800
1800
|
...algorithm,
|
1801
1801
|
iv: salt,
|
1802
|
-
}, this.native, closed);
|
1802
|
+
}, this.native, closed));
|
1803
1803
|
}
|
1804
1804
|
}
|
1805
1805
|
$.$mol_crypto_secret = $mol_crypto_secret;
|
@@ -2195,7 +2195,7 @@ var $;
|
|
2195
2195
|
return new $mol_crypto_key_public(this.buffer, this.byteOffset, this.byteOffset + 64);
|
2196
2196
|
}
|
2197
2197
|
async sign(data) {
|
2198
|
-
return await $mol_crypto_native.subtle.sign(algorithm, await this.native(), data);
|
2198
|
+
return new Uint8Array(await $mol_crypto_native.subtle.sign(algorithm, await this.native(), data));
|
2199
2199
|
}
|
2200
2200
|
}
|
2201
2201
|
__decorate([
|