@reallyme/crypto 0.3.15 → 0.3.16
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.
|
@@ -814,28 +814,28 @@ export function xchacha20Poly1305Seal(key, nonce, aad, plaintext) {
|
|
|
814
814
|
function __wbg_get_imports() {
|
|
815
815
|
const import0 = {
|
|
816
816
|
__proto__: null,
|
|
817
|
-
|
|
817
|
+
__wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
|
|
818
818
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
819
819
|
},
|
|
820
|
-
|
|
820
|
+
__wbg_getRandomValues_8b6f1f663e6f188d: function() { return handleError(function (arg0, arg1) {
|
|
821
821
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
822
822
|
}, arguments); },
|
|
823
|
-
|
|
823
|
+
__wbg_length_186163212ffe79c3: function(arg0) {
|
|
824
824
|
const ret = arg0.length;
|
|
825
825
|
return ret;
|
|
826
826
|
},
|
|
827
|
-
|
|
827
|
+
__wbg_new_cd4348290afae586: function() {
|
|
828
828
|
const ret = new Object();
|
|
829
829
|
return ret;
|
|
830
830
|
},
|
|
831
|
-
|
|
831
|
+
__wbg_new_from_slice_b8daf545a41c6aa0: function(arg0, arg1) {
|
|
832
832
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
833
833
|
return ret;
|
|
834
834
|
},
|
|
835
|
-
|
|
835
|
+
__wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
|
|
836
836
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
837
837
|
},
|
|
838
|
-
|
|
838
|
+
__wbg_set_2793479888329cb6: function() { return handleError(function (arg0, arg1, arg2) {
|
|
839
839
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
840
840
|
return ret;
|
|
841
841
|
}, arguments); },
|
|
@@ -851,12 +851,11 @@ function __wbg_get_imports() {
|
|
|
851
851
|
},
|
|
852
852
|
__wbindgen_init_externref_table: function() {
|
|
853
853
|
const table = wasm.__wbindgen_externrefs;
|
|
854
|
-
const offset = table.grow(4);
|
|
855
854
|
table.set(0, undefined);
|
|
856
|
-
table.set(
|
|
857
|
-
table.set(
|
|
858
|
-
table.set(
|
|
859
|
-
table.set(
|
|
855
|
+
table.set(1024, undefined);
|
|
856
|
+
table.set(1025, null);
|
|
857
|
+
table.set(1026, true);
|
|
858
|
+
table.set(1027, false);
|
|
860
859
|
},
|
|
861
860
|
};
|
|
862
861
|
return {
|
|
@@ -877,7 +876,8 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
877
876
|
}
|
|
878
877
|
|
|
879
878
|
function getStringFromWasm0(ptr, len) {
|
|
880
|
-
|
|
879
|
+
ptr = ptr >>> 0;
|
|
880
|
+
return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
881
881
|
}
|
|
882
882
|
|
|
883
883
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -903,18 +903,18 @@ function takeFromExternrefTable0(idx) {
|
|
|
903
903
|
return value;
|
|
904
904
|
}
|
|
905
905
|
|
|
906
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
906
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
907
907
|
cachedTextDecoder.decode();
|
|
908
908
|
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
909
909
|
let numBytesDecoded = 0;
|
|
910
|
-
function decodeText(
|
|
911
|
-
numBytesDecoded +=
|
|
910
|
+
function decodeText(bytes) {
|
|
911
|
+
numBytesDecoded += bytes.length;
|
|
912
912
|
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
913
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
913
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
914
914
|
cachedTextDecoder.decode();
|
|
915
|
-
numBytesDecoded =
|
|
915
|
+
numBytesDecoded = bytes.length;
|
|
916
916
|
}
|
|
917
|
-
return cachedTextDecoder.decode(
|
|
917
|
+
return cachedTextDecoder.decode(bytes);
|
|
918
918
|
}
|
|
919
919
|
|
|
920
920
|
let wasmModule, wasmInstance, wasm;
|
|
@@ -986,9 +986,17 @@ function initSync(module) {
|
|
|
986
986
|
return __wbg_finalize_init(instance, module);
|
|
987
987
|
}
|
|
988
988
|
|
|
989
|
+
let __wbg_init_promise;
|
|
989
990
|
async function __wbg_init(module_or_path) {
|
|
990
991
|
if (wasm !== undefined) return wasm;
|
|
992
|
+
if (__wbg_init_promise === undefined) {
|
|
993
|
+
__wbg_init_promise = __wbg_init_once(module_or_path);
|
|
994
|
+
__wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
|
|
995
|
+
}
|
|
996
|
+
return __wbg_init_promise;
|
|
997
|
+
}
|
|
991
998
|
|
|
999
|
+
async function __wbg_init_once(module_or_path) {
|
|
992
1000
|
|
|
993
1001
|
if (module_or_path !== undefined) {
|
|
994
1002
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
Binary file
|