hpke 0.3.0 → 0.4.0
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/package.json +8 -6
- package/pkg/node/hpke_dispatch.d.ts +18 -18
- package/pkg/node/hpke_dispatch.js +56 -47
- package/pkg/node/hpke_dispatch_bg.wasm +0 -0
- package/pkg/node/index.spec.mjs +4625 -0
- package/pkg/node/index.spec.mjs.map +7 -0
- package/pkg/node/module.mjs +582 -0
- package/pkg/node/module.mjs.map +7 -0
- package/pkg/node/package.json +1 -1
- package/pkg/web/hpke_dispatch.d.ts +29 -18
- package/pkg/web/hpke_dispatch.js +97 -57
- package/pkg/web/hpke_dispatch_bg.wasm +0 -0
- package/pkg/web/index.mjs +1 -1
- package/pkg/web/index.mjs.map +2 -2
- package/pkg/web/package.json +1 -1
- package/pkg/node/index.ts +0 -6
- package/pkg/node/node.ts +0 -6
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["hpke_dispatch.js", "index.ts"],
|
|
4
|
+
"sourcesContent": ["let imports = {};\nimports['__wbindgen_placeholder__'] = module.exports;\nlet wasm;\nconst { TextDecoder } = require(`util`);\n\nconst heap = new Array(32).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 36) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachegetUint8Memory0 = null;\nfunction getUint8Memory0() {\n if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {\n cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachegetUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1);\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nlet cachegetInt32Memory0 = null;\nfunction getInt32Memory0() {\n if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {\n cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachegetInt32Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n*\n*`base_mode_open` provides an interface to [`hpke::single_shot_open`]\n*that does not require compile time selection of an algorithm. Instead,\n*the selected algorithm is provided through the [`Config`] passed as\n*the first argument.\n*\n*Requires the `base-mode-open` crate feature to be enabled.\n*\n*# Errors\n*\n*This will return an `Result::Err` variant if:\n*\n** we are unable to deserialize the private key or encapsulated key\n** there is an error in key decapsulation\n** there is an error in decryption\n*\n* @param {Config} config\n* @param {Uint8Array} private_key\n* @param {Uint8Array} encapped_key\n* @param {Uint8Array} info\n* @param {Uint8Array} ciphertext\n* @param {Uint8Array} aad\n* @returns {Uint8Array}\n*/\nmodule.exports.base_mode_open = function(config, private_key, encapped_key, info, ciphertext, aad) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(config, Config);\n const ptr0 = passArray8ToWasm0(private_key, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray8ToWasm0(encapped_key, wasm.__wbindgen_malloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passArray8ToWasm0(info, wasm.__wbindgen_malloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passArray8ToWasm0(ciphertext, wasm.__wbindgen_malloc);\n const len3 = WASM_VECTOR_LEN;\n const ptr4 = passArray8ToWasm0(aad, wasm.__wbindgen_malloc);\n const len4 = WASM_VECTOR_LEN;\n wasm.base_mode_open(retptr, config.ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v5 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1);\n return v5;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n};\n\n/**\n*\n*`base_mode_seal` provides an interface to [`hpke::single_shot_seal`]\n*that does not require compile time selection of an\n*algorithm. Instead, the selected algorithm is provided through the\n*[`Config`] passed as the first argument.\n*\n*Requires the `base-mode-seal` crate feature to be enabled.\n*\n*# Errors\n*\n*This will return an `Result::Err` variant if:\n*\n** we are unable to deserialize the recipient public key\n** there is an error in key encapsultion\n** there is an error in encryption\n*\n*\n* @param {Config} config\n* @param {Uint8Array} recipient_public_key\n* @param {Uint8Array} info\n* @param {Uint8Array} plaintext\n* @param {Uint8Array} aad\n* @returns {EncappedKeyAndCiphertext}\n*/\nmodule.exports.base_mode_seal = function(config, recipient_public_key, info, plaintext, aad) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(config, Config);\n const ptr0 = passArray8ToWasm0(recipient_public_key, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray8ToWasm0(info, wasm.__wbindgen_malloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passArray8ToWasm0(plaintext, wasm.__wbindgen_malloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passArray8ToWasm0(aad, wasm.__wbindgen_malloc);\n const len3 = WASM_VECTOR_LEN;\n wasm.base_mode_seal(retptr, config.ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return EncappedKeyAndCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n};\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\n/**\n*\n*Aead represents an authenticated encryption with additional data\n*encryption function, as per [RFC9180\u00A77.3](https://www.rfc-editor.org/rfc/rfc9180.html#section-7.3)\n*/\nmodule.exports.Aead = Object.freeze({\n/**\n* AES-128-GCM [GCM](https://doi.org/10.6028/nist.sp.800-38d)\n*/\nAesGcm128:1,\"1\":\"AesGcm128\",\n/**\n* AES-256-GCM [GCM](https://doi.org/10.6028/nist.sp.800-38d)\n*/\nAesGcm256:2,\"2\":\"AesGcm256\",\n/**\n* ChaCha20Poly1305 [RFC8439](https://www.rfc-editor.org/info/rfc8439)\n*/\nChaCha20Poly1305:3,\"3\":\"ChaCha20Poly1305\", });\n/**\n*\n*Kdf represents an key derivation function, as per\n*[RFC9180\u00A77.2](https://www.rfc-editor.org/rfc/rfc9180.html#section-7.2)\n*/\nmodule.exports.Kdf = Object.freeze({\n/**\n* Sha256 [RFC5869](https://www.rfc-editor.org/info/rfc5869)\n*/\nSha256:1,\"1\":\"Sha256\",\n/**\n* Sha384 [RFC5869](https://www.rfc-editor.org/info/rfc5869)\n*/\nSha384:2,\"2\":\"Sha384\",\n/**\n* Sha512 [RFC5869](https://www.rfc-editor.org/info/rfc5869)\n*/\nSha512:3,\"3\":\"Sha512\", });\n/**\n*\n*Kem represents an asymmetric key encapsulation mechanism, as per\n*[RFC9180\u00A77.1][section-7.1]. Currently only two of options listed in\n*the hpke draft are available.\n*\n*[section-7.1]: https://www.rfc-editor.org/rfc/rfc9180.html#section-7.1\n*/\nmodule.exports.Kem = Object.freeze({\n/**\n* DHKEM(P-256, HKDF-SHA256) [NISTCurves](https://doi.org/10.6028/nist.fips.186-4)\n*/\nDhP256HkdfSha256:16,\"16\":\"DhP256HkdfSha256\",\n/**\n* DHKEM(X25519, HKDF-SHA256) [RFC7748](https://www.rfc-editor.org/info/rfc7748)\n*/\nX25519HkdfSha256:32,\"32\":\"X25519HkdfSha256\", });\n/**\n*\n*Config is an open struct that contains an ([`Aead`], [`Kdf`], [`Kem`])\n*algorithmic triple. This can be used with [`Config::base_mode_seal`],\n*[`Config::base_mode_open`], [`base_mode_seal`], or [`base_mode_open`].\n*/\nclass Config {\n\n static __wrap(ptr) {\n const obj = Object.create(Config.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_config_free(ptr);\n }\n /**\n * the [authenticated encryption with additional data encryption function](crate::Aead) to be used\n */\n get aead() {\n const ret = wasm.__wbg_get_config_aead(this.ptr);\n return ret >>> 0;\n }\n /**\n * the [authenticated encryption with additional data encryption function](crate::Aead) to be used\n * @param {number} arg0\n */\n set aead(arg0) {\n wasm.__wbg_set_config_aead(this.ptr, arg0);\n }\n /**\n * the [key derivation function](crate::Kdf) to be used\n */\n get kdf() {\n const ret = wasm.__wbg_get_config_kdf(this.ptr);\n return ret >>> 0;\n }\n /**\n * the [key derivation function](crate::Kdf) to be used\n * @param {number} arg0\n */\n set kdf(arg0) {\n wasm.__wbg_set_config_kdf(this.ptr, arg0);\n }\n /**\n * the [asymmetric key encapsulation mechanism](crate::Kem) to be used\n */\n get kem() {\n const ret = wasm.__wbg_get_config_kem(this.ptr);\n return ret >>> 0;\n }\n /**\n * the [asymmetric key encapsulation mechanism](crate::Kem) to be used\n * @param {number} arg0\n */\n set kem(arg0) {\n wasm.__wbg_set_config_kem(this.ptr, arg0);\n }\n /**\n *\n * base_mode_seal provides an interface to [`hpke::single_shot_seal`] that does\n * not require compile time selection of an algorithm. Instead, the\n * selected algorithm is provided through the [`Config`] that this\n * method is called on.\n *\n * Requires the `base-mode-seal` crate feature to be enabled.\n *\n * # Errors\n *\n * This will return an `Result::Err` variant if:\n *\n * * we are unable to deserialize the recipient public key\n * * there is an error in key encapsultion\n * * there is an error in encryption\n *\n *\n * @param {Uint8Array} recipient_public_key\n * @param {Uint8Array} info\n * @param {Uint8Array} plaintext\n * @param {Uint8Array} aad\n * @returns {EncappedKeyAndCiphertext}\n */\n base_mode_seal(recipient_public_key, info, plaintext, aad) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(recipient_public_key, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray8ToWasm0(info, wasm.__wbindgen_malloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passArray8ToWasm0(plaintext, wasm.__wbindgen_malloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passArray8ToWasm0(aad, wasm.__wbindgen_malloc);\n const len3 = WASM_VECTOR_LEN;\n wasm.config_base_mode_seal(retptr, this.ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return EncappedKeyAndCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n *\n * base_mode_open provides an interface to [`hpke::single_shot_open`]\n * that does not require compile time selection of an\n * algorithm. Instead, the selected algorithm is provided through the\n * [`Config`] that this method is called on.\n *\n * Requires the `base-mode-open` crate feature to be enabled.\n *\n * # Errors\n *\n * This will return an `Result::Err` variant if:\n *\n * * we are unable to deserialize the private key or encapsulated key\n * * there is an error in key decapsulation\n * * there is an error in decryption\n *\n *\n * @param {Uint8Array} private_key\n * @param {Uint8Array} encapped_key\n * @param {Uint8Array} info\n * @param {Uint8Array} ciphertext\n * @param {Uint8Array} aad\n * @returns {Uint8Array}\n */\n base_mode_open(private_key, encapped_key, info, ciphertext, aad) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(private_key, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray8ToWasm0(encapped_key, wasm.__wbindgen_malloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passArray8ToWasm0(info, wasm.__wbindgen_malloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passArray8ToWasm0(ciphertext, wasm.__wbindgen_malloc);\n const len3 = WASM_VECTOR_LEN;\n const ptr4 = passArray8ToWasm0(aad, wasm.__wbindgen_malloc);\n const len4 = WASM_VECTOR_LEN;\n wasm.config_base_mode_open(retptr, this.ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v5 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1);\n return v5;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Attempt to convert three u16 ids into a valid config. The id mappings are defined in the draft.\n * @param {number} aead_id\n * @param {number} kdf_id\n * @param {number} kem_id\n * @returns {Config}\n */\n static try_from_ids(aead_id, kdf_id, kem_id) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.config_try_from_ids(retptr, aead_id, kdf_id, kem_id);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Config.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\nmodule.exports.Config = Config;\n/**\n*\n*a simple struct to return the combined encapsulated key\n*and ciphertext from seal\n*/\nclass EncappedKeyAndCiphertext {\n\n static __wrap(ptr) {\n const obj = Object.create(EncappedKeyAndCiphertext.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_encappedkeyandciphertext_free(ptr);\n }\n /**\n * the encapsulated encryption key\n */\n get encapped_key() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_encappedkeyandciphertext_encapped_key(retptr, this.ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var v0 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1);\n return v0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * the encapsulated encryption key\n * @param {Uint8Array} arg0\n */\n set encapped_key(arg0) {\n const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_encappedkeyandciphertext_encapped_key(this.ptr, ptr0, len0);\n }\n /**\n * the ciphertext, encrypted with the key\n */\n get ciphertext() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_encappedkeyandciphertext_ciphertext(retptr, this.ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var v0 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1);\n return v0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * the ciphertext, encrypted with the key\n * @param {Uint8Array} arg0\n */\n set ciphertext(arg0) {\n const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_encappedkeyandciphertext_ciphertext(this.ptr, ptr0, len0);\n }\n}\nmodule.exports.EncappedKeyAndCiphertext = EncappedKeyAndCiphertext;\n/**\n*r\"\n* a newtype wrapper for HpkeError so we can use it in wasm_bindgen\n*\n*/\nclass HpkeError {\n\n static __wrap(ptr) {\n const obj = Object.create(HpkeError.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_hpkeerror_free(ptr);\n }\n}\nmodule.exports.HpkeError = HpkeError;\n/**\n*\n*A simple error type for failed id lookups\n*\n*/\nclass IdLookupError {\n\n static __wrap(ptr) {\n const obj = Object.create(IdLookupError.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_idlookuperror_free(ptr);\n }\n}\nmodule.exports.IdLookupError = IdLookupError;\n/**\n* An encoded keypair\n*/\nclass Keypair {\n\n static __wrap(ptr) {\n const obj = Object.create(Keypair.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_keypair_free(ptr);\n }\n /**\n * the public key for this keypair\n */\n get public_key() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_keypair_public_key(retptr, this.ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var v0 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1);\n return v0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * the public key for this keypair\n * @param {Uint8Array} arg0\n */\n set public_key(arg0) {\n const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_keypair_public_key(this.ptr, ptr0, len0);\n }\n /**\n * the private key for this keypair,\n */\n get private_key() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_keypair_private_key(retptr, this.ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var v0 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1);\n return v0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * the private key for this keypair,\n * @param {Uint8Array} arg0\n */\n set private_key(arg0) {\n const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_keypair_private_key(this.ptr, ptr0, len0);\n }\n /**\n * generate a keypair from a [`Kem`]\n * @param {number} kem\n */\n constructor(kem) {\n const ret = wasm.keypair_new(kem);\n return Keypair.__wrap(ret);\n }\n}\nmodule.exports.Keypair = Keypair;\n\nmodule.exports.__wbg_hpkeerror_new = function(arg0) {\n const ret = HpkeError.__wrap(arg0);\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_idlookuperror_new = function(arg0) {\n const ret = IdLookupError.__wrap(arg0);\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_randomFillSync_654a7797990fb8db = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));\n}, arguments) };\n\nmodule.exports.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n};\n\nmodule.exports.__wbg_getRandomValues_fb6b088efb6bead2 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n}, arguments) };\n\nmodule.exports.__wbg_process_70251ed1291754d5 = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n};\n\nmodule.exports.__wbg_versions_b23f2588cdb2ddbb = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_node_61b8c9a82499895d = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n};\n\nmodule.exports.__wbg_crypto_2f56257a38275dbd = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_msCrypto_d07655bf62361f21 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_static_accessor_NODE_MODULE_33b45247c55045b0 = function() {\n const ret = module;\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_require_2a93bc09fee45aca = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));\n return addHeapObject(ret);\n}, arguments) };\n\nmodule.exports.__wbg_newnoargs_e23b458e372830de = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_call_ae78342adc33730a = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n}, arguments) };\n\nmodule.exports.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_self_99737b4dcdf6f0d8 = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nmodule.exports.__wbg_window_9b61fbbf3564c4fb = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n}, arguments) };\n\nmodule.exports.__wbg_globalThis_8e275ef40caea3a3 = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n}, arguments) };\n\nmodule.exports.__wbg_global_5de1e0f82bddcd27 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n}, arguments) };\n\nmodule.exports.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n};\n\nmodule.exports.__wbg_buffer_7af23f65f6c64548 = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_new_cc9018bd6f283b6f = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_set_f25e869e4565d2a2 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n};\n\nmodule.exports.__wbg_length_0acb1cf9bbaf8519 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n};\n\nmodule.exports.__wbg_newwithlength_8f0657faca9f1422 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbg_subarray_da527dbd24eafb6b = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n};\n\nmodule.exports.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nmodule.exports.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n};\n\n", "import wasm from \"./hpke_dispatch_bg.wasm\";\nimport init from \"./hpke_dispatch.js\";\n//this is exported so it doesn't get dead-code-eliminated\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nexport const __wasm = init(wasm);\nexport * from \"./hpke_dispatch.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,QAAI,UAAU,CAAC;AACf,YAAQ,8BAA8B,OAAO;AAC7C,QAAI;AACJ,QAAM,EAAE,gBAAgB,UAAQ;AAEhC,QAAM,OAAO,IAAI,MAAM,EAAE,EAAE,KAAK,MAAS;AAEzC,SAAK,KAAK,QAAW,MAAM,MAAM,KAAK;AAEtC,uBAAmB,KAAK;AAAE,aAAO,KAAK;AAAA,IAAM;AAE5C,QAAI,YAAY,KAAK;AAErB,wBAAoB,KAAK;AACrB,UAAI,MAAM;AAAI;AACd,WAAK,OAAO;AACZ,kBAAY;AAAA,IAChB;AAEA,wBAAoB,KAAK;AACrB,YAAM,MAAM,UAAU,GAAG;AACzB,iBAAW,GAAG;AACd,aAAO;AAAA,IACX;AAEA,2BAAuB,KAAK;AACxB,UAAI,cAAc,KAAK;AAAQ,aAAK,KAAK,KAAK,SAAS,CAAC;AACxD,YAAM,MAAM;AACZ,kBAAY,KAAK;AAEjB,WAAK,OAAO;AACZ,aAAO;AAAA,IACX;AAEA,QAAI,oBAAoB,IAAI,YAAY,SAAS,EAAE,WAAW,MAAM,OAAO,KAAK,CAAC;AAEjF,sBAAkB,OAAO;AAEzB,QAAI,uBAAuB;AAC3B,+BAA2B;AACvB,UAAI,yBAAyB,QAAQ,qBAAqB,WAAW,KAAK,OAAO,QAAQ;AACrF,+BAAuB,IAAI,WAAW,KAAK,OAAO,MAAM;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G;AAAA,IAC5B;AAAA;AAAA;;;ACzxBA;AAAA;AAAA;AAAA;;;;;;AACA,2BAAiB;AAIjB,yBAAc;AADP,IAAM,SAAS,kCAAK,wBAAI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/pkg/node/package.json
CHANGED
|
@@ -54,41 +54,41 @@ export function base_mode_open(config: Config, private_key: Uint8Array, encapped
|
|
|
54
54
|
export function base_mode_seal(config: Config, recipient_public_key: Uint8Array, info: Uint8Array, plaintext: Uint8Array, aad: Uint8Array): EncappedKeyAndCiphertext;
|
|
55
55
|
/**
|
|
56
56
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
57
|
+
*Kdf represents an key derivation function, as per
|
|
58
|
+
*[RFC9180§7.2](https://www.rfc-editor.org/rfc/rfc9180.html#section-7.2)
|
|
59
59
|
*/
|
|
60
|
-
export enum
|
|
60
|
+
export enum Kdf {
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Sha256 [RFC5869](https://www.rfc-editor.org/info/rfc5869)
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
Sha256,
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Sha384 [RFC5869](https://www.rfc-editor.org/info/rfc5869)
|
|
67
67
|
*/
|
|
68
|
-
|
|
68
|
+
Sha384,
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* Sha512 [RFC5869](https://www.rfc-editor.org/info/rfc5869)
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
Sha512,
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
*
|
|
76
|
-
*
|
|
77
|
-
*[RFC9180§7.
|
|
76
|
+
*Aead represents an authenticated encryption with additional data
|
|
77
|
+
*encryption function, as per [RFC9180§7.3](https://www.rfc-editor.org/rfc/rfc9180.html#section-7.3)
|
|
78
78
|
*/
|
|
79
|
-
export enum
|
|
79
|
+
export enum Aead {
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* AES-128-GCM [GCM](https://doi.org/10.6028/nist.sp.800-38d)
|
|
82
82
|
*/
|
|
83
|
-
|
|
83
|
+
AesGcm128,
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* AES-256-GCM [GCM](https://doi.org/10.6028/nist.sp.800-38d)
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
AesGcm256,
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* ChaCha20Poly1305 [RFC8439](https://www.rfc-editor.org/info/rfc8439)
|
|
90
90
|
*/
|
|
91
|
-
|
|
91
|
+
ChaCha20Poly1305,
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
*
|
|
@@ -275,6 +275,17 @@ export interface InitOutput {
|
|
|
275
275
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
279
|
+
/**
|
|
280
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
281
|
+
* a precompiled `WebAssembly.Module`.
|
|
282
|
+
*
|
|
283
|
+
* @param {SyncInitInput} module
|
|
284
|
+
*
|
|
285
|
+
* @returns {InitOutput}
|
|
286
|
+
*/
|
|
287
|
+
export function initSync(module: SyncInitInput): InitOutput;
|
|
288
|
+
|
|
278
289
|
/**
|
|
279
290
|
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
280
291
|
* for everything else, calls `WebAssembly.instantiate` directly.
|
package/pkg/web/hpke_dispatch.js
CHANGED
|
@@ -34,12 +34,13 @@ const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: tru
|
|
|
34
34
|
|
|
35
35
|
cachedTextDecoder.decode();
|
|
36
36
|
|
|
37
|
-
let
|
|
37
|
+
let cachedUint8Memory0 = new Uint8Array();
|
|
38
|
+
|
|
38
39
|
function getUint8Memory0() {
|
|
39
|
-
if (
|
|
40
|
-
|
|
40
|
+
if (cachedUint8Memory0.byteLength === 0) {
|
|
41
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
41
42
|
}
|
|
42
|
-
return
|
|
43
|
+
return cachedUint8Memory0;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
function getStringFromWasm0(ptr, len) {
|
|
@@ -62,12 +63,13 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
62
63
|
return ptr;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
let
|
|
66
|
+
let cachedInt32Memory0 = new Int32Array();
|
|
67
|
+
|
|
66
68
|
function getInt32Memory0() {
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
+
if (cachedInt32Memory0.byteLength === 0) {
|
|
70
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
69
71
|
}
|
|
70
|
-
return
|
|
72
|
+
return cachedInt32Memory0;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
function getArrayU8FromWasm0(ptr, len) {
|
|
@@ -187,24 +189,6 @@ function handleError(f, args) {
|
|
|
187
189
|
}
|
|
188
190
|
/**
|
|
189
191
|
*
|
|
190
|
-
*Aead represents an authenticated encryption with additional data
|
|
191
|
-
*encryption function, as per [RFC9180§7.3](https://www.rfc-editor.org/rfc/rfc9180.html#section-7.3)
|
|
192
|
-
*/
|
|
193
|
-
export const Aead = Object.freeze({
|
|
194
|
-
/**
|
|
195
|
-
* AES-128-GCM [GCM](https://doi.org/10.6028/nist.sp.800-38d)
|
|
196
|
-
*/
|
|
197
|
-
AesGcm128:1,"1":"AesGcm128",
|
|
198
|
-
/**
|
|
199
|
-
* AES-256-GCM [GCM](https://doi.org/10.6028/nist.sp.800-38d)
|
|
200
|
-
*/
|
|
201
|
-
AesGcm256:2,"2":"AesGcm256",
|
|
202
|
-
/**
|
|
203
|
-
* ChaCha20Poly1305 [RFC8439](https://www.rfc-editor.org/info/rfc8439)
|
|
204
|
-
*/
|
|
205
|
-
ChaCha20Poly1305:3,"3":"ChaCha20Poly1305", });
|
|
206
|
-
/**
|
|
207
|
-
*
|
|
208
192
|
*Kdf represents an key derivation function, as per
|
|
209
193
|
*[RFC9180§7.2](https://www.rfc-editor.org/rfc/rfc9180.html#section-7.2)
|
|
210
194
|
*/
|
|
@@ -223,6 +207,24 @@ Sha384:2,"2":"Sha384",
|
|
|
223
207
|
Sha512:3,"3":"Sha512", });
|
|
224
208
|
/**
|
|
225
209
|
*
|
|
210
|
+
*Aead represents an authenticated encryption with additional data
|
|
211
|
+
*encryption function, as per [RFC9180§7.3](https://www.rfc-editor.org/rfc/rfc9180.html#section-7.3)
|
|
212
|
+
*/
|
|
213
|
+
export const Aead = Object.freeze({
|
|
214
|
+
/**
|
|
215
|
+
* AES-128-GCM [GCM](https://doi.org/10.6028/nist.sp.800-38d)
|
|
216
|
+
*/
|
|
217
|
+
AesGcm128:1,"1":"AesGcm128",
|
|
218
|
+
/**
|
|
219
|
+
* AES-256-GCM [GCM](https://doi.org/10.6028/nist.sp.800-38d)
|
|
220
|
+
*/
|
|
221
|
+
AesGcm256:2,"2":"AesGcm256",
|
|
222
|
+
/**
|
|
223
|
+
* ChaCha20Poly1305 [RFC8439](https://www.rfc-editor.org/info/rfc8439)
|
|
224
|
+
*/
|
|
225
|
+
ChaCha20Poly1305:3,"3":"ChaCha20Poly1305", });
|
|
226
|
+
/**
|
|
227
|
+
*
|
|
226
228
|
*Kem represents an asymmetric key encapsulation mechanism, as per
|
|
227
229
|
*[RFC9180§7.1][section-7.1]. Currently only two of options listed in
|
|
228
230
|
*the hpke draft are available.
|
|
@@ -266,6 +268,7 @@ export class Config {
|
|
|
266
268
|
}
|
|
267
269
|
/**
|
|
268
270
|
* the [authenticated encryption with additional data encryption function](crate::Aead) to be used
|
|
271
|
+
* @returns {number}
|
|
269
272
|
*/
|
|
270
273
|
get aead() {
|
|
271
274
|
const ret = wasm.__wbg_get_config_aead(this.ptr);
|
|
@@ -280,6 +283,7 @@ export class Config {
|
|
|
280
283
|
}
|
|
281
284
|
/**
|
|
282
285
|
* the [key derivation function](crate::Kdf) to be used
|
|
286
|
+
* @returns {number}
|
|
283
287
|
*/
|
|
284
288
|
get kdf() {
|
|
285
289
|
const ret = wasm.__wbg_get_config_kdf(this.ptr);
|
|
@@ -294,6 +298,7 @@ export class Config {
|
|
|
294
298
|
}
|
|
295
299
|
/**
|
|
296
300
|
* the [asymmetric key encapsulation mechanism](crate::Kem) to be used
|
|
301
|
+
* @returns {number}
|
|
297
302
|
*/
|
|
298
303
|
get kem() {
|
|
299
304
|
const ret = wasm.__wbg_get_config_kem(this.ptr);
|
|
@@ -456,6 +461,7 @@ export class EncappedKeyAndCiphertext {
|
|
|
456
461
|
}
|
|
457
462
|
/**
|
|
458
463
|
* the encapsulated encryption key
|
|
464
|
+
* @returns {Uint8Array}
|
|
459
465
|
*/
|
|
460
466
|
get encapped_key() {
|
|
461
467
|
try {
|
|
@@ -481,6 +487,7 @@ export class EncappedKeyAndCiphertext {
|
|
|
481
487
|
}
|
|
482
488
|
/**
|
|
483
489
|
* the ciphertext, encrypted with the key
|
|
490
|
+
* @returns {Uint8Array}
|
|
484
491
|
*/
|
|
485
492
|
get ciphertext() {
|
|
486
493
|
try {
|
|
@@ -582,6 +589,7 @@ export class Keypair {
|
|
|
582
589
|
}
|
|
583
590
|
/**
|
|
584
591
|
* the public key for this keypair
|
|
592
|
+
* @returns {Uint8Array}
|
|
585
593
|
*/
|
|
586
594
|
get public_key() {
|
|
587
595
|
try {
|
|
@@ -607,6 +615,7 @@ export class Keypair {
|
|
|
607
615
|
}
|
|
608
616
|
/**
|
|
609
617
|
* the private key for this keypair,
|
|
618
|
+
* @returns {Uint8Array}
|
|
610
619
|
*/
|
|
611
620
|
get private_key() {
|
|
612
621
|
try {
|
|
@@ -671,10 +680,7 @@ async function load(module, imports) {
|
|
|
671
680
|
}
|
|
672
681
|
}
|
|
673
682
|
|
|
674
|
-
|
|
675
|
-
if (typeof input === 'undefined') {
|
|
676
|
-
input = new URL('hpke_dispatch_bg.wasm', import.meta.url);
|
|
677
|
-
}
|
|
683
|
+
function getImports() {
|
|
678
684
|
const imports = {};
|
|
679
685
|
imports.wbg = {};
|
|
680
686
|
imports.wbg.__wbg_hpkeerror_new = function(arg0) {
|
|
@@ -685,16 +691,16 @@ async function init(input) {
|
|
|
685
691
|
const ret = IdLookupError.__wrap(arg0);
|
|
686
692
|
return addHeapObject(ret);
|
|
687
693
|
};
|
|
688
|
-
imports.wbg.
|
|
694
|
+
imports.wbg.__wbg_randomFillSync_065afffde01daa66 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
689
695
|
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
690
696
|
}, arguments) };
|
|
691
697
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
692
698
|
takeObject(arg0);
|
|
693
699
|
};
|
|
694
|
-
imports.wbg.
|
|
700
|
+
imports.wbg.__wbg_getRandomValues_b99eec4244a475bb = function() { return handleError(function (arg0, arg1) {
|
|
695
701
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
696
702
|
}, arguments) };
|
|
697
|
-
imports.wbg.
|
|
703
|
+
imports.wbg.__wbg_process_0cc2ada8524d6f83 = function(arg0) {
|
|
698
704
|
const ret = getObject(arg0).process;
|
|
699
705
|
return addHeapObject(ret);
|
|
700
706
|
};
|
|
@@ -703,11 +709,11 @@ async function init(input) {
|
|
|
703
709
|
const ret = typeof(val) === 'object' && val !== null;
|
|
704
710
|
return ret;
|
|
705
711
|
};
|
|
706
|
-
imports.wbg.
|
|
712
|
+
imports.wbg.__wbg_versions_c11acceab27a6c87 = function(arg0) {
|
|
707
713
|
const ret = getObject(arg0).versions;
|
|
708
714
|
return addHeapObject(ret);
|
|
709
715
|
};
|
|
710
|
-
imports.wbg.
|
|
716
|
+
imports.wbg.__wbg_node_7ff1ce49caf23815 = function(arg0) {
|
|
711
717
|
const ret = getObject(arg0).node;
|
|
712
718
|
return addHeapObject(ret);
|
|
713
719
|
};
|
|
@@ -715,27 +721,27 @@ async function init(input) {
|
|
|
715
721
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
716
722
|
return ret;
|
|
717
723
|
};
|
|
718
|
-
imports.wbg.
|
|
724
|
+
imports.wbg.__wbg_crypto_2036bed7c44c25e7 = function(arg0) {
|
|
719
725
|
const ret = getObject(arg0).crypto;
|
|
720
726
|
return addHeapObject(ret);
|
|
721
727
|
};
|
|
722
|
-
imports.wbg.
|
|
728
|
+
imports.wbg.__wbg_msCrypto_a21fc88caf1ecdc8 = function(arg0) {
|
|
723
729
|
const ret = getObject(arg0).msCrypto;
|
|
724
730
|
return addHeapObject(ret);
|
|
725
731
|
};
|
|
726
|
-
imports.wbg.
|
|
732
|
+
imports.wbg.__wbg_static_accessor_NODE_MODULE_cf6401cc1091279e = function() {
|
|
727
733
|
const ret = module;
|
|
728
734
|
return addHeapObject(ret);
|
|
729
735
|
};
|
|
730
|
-
imports.wbg.
|
|
736
|
+
imports.wbg.__wbg_require_a746e79b322b9336 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
731
737
|
const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
|
|
732
738
|
return addHeapObject(ret);
|
|
733
739
|
}, arguments) };
|
|
734
|
-
imports.wbg.
|
|
740
|
+
imports.wbg.__wbg_newnoargs_b5b063fc6c2f0376 = function(arg0, arg1) {
|
|
735
741
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
736
742
|
return addHeapObject(ret);
|
|
737
743
|
};
|
|
738
|
-
imports.wbg.
|
|
744
|
+
imports.wbg.__wbg_call_97ae9d8645dc388b = function() { return handleError(function (arg0, arg1) {
|
|
739
745
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
740
746
|
return addHeapObject(ret);
|
|
741
747
|
}, arguments) };
|
|
@@ -743,19 +749,19 @@ async function init(input) {
|
|
|
743
749
|
const ret = getObject(arg0);
|
|
744
750
|
return addHeapObject(ret);
|
|
745
751
|
};
|
|
746
|
-
imports.wbg.
|
|
752
|
+
imports.wbg.__wbg_self_6d479506f72c6a71 = function() { return handleError(function () {
|
|
747
753
|
const ret = self.self;
|
|
748
754
|
return addHeapObject(ret);
|
|
749
755
|
}, arguments) };
|
|
750
|
-
imports.wbg.
|
|
756
|
+
imports.wbg.__wbg_window_f2557cc78490aceb = function() { return handleError(function () {
|
|
751
757
|
const ret = window.window;
|
|
752
758
|
return addHeapObject(ret);
|
|
753
759
|
}, arguments) };
|
|
754
|
-
imports.wbg.
|
|
760
|
+
imports.wbg.__wbg_globalThis_7f206bda628d5286 = function() { return handleError(function () {
|
|
755
761
|
const ret = globalThis.globalThis;
|
|
756
762
|
return addHeapObject(ret);
|
|
757
763
|
}, arguments) };
|
|
758
|
-
imports.wbg.
|
|
764
|
+
imports.wbg.__wbg_global_ba75c50d1cf384f4 = function() { return handleError(function () {
|
|
759
765
|
const ret = global.global;
|
|
760
766
|
return addHeapObject(ret);
|
|
761
767
|
}, arguments) };
|
|
@@ -763,26 +769,26 @@ async function init(input) {
|
|
|
763
769
|
const ret = getObject(arg0) === undefined;
|
|
764
770
|
return ret;
|
|
765
771
|
};
|
|
766
|
-
imports.wbg.
|
|
772
|
+
imports.wbg.__wbg_buffer_3f3d764d4747d564 = function(arg0) {
|
|
767
773
|
const ret = getObject(arg0).buffer;
|
|
768
774
|
return addHeapObject(ret);
|
|
769
775
|
};
|
|
770
|
-
imports.wbg.
|
|
776
|
+
imports.wbg.__wbg_new_8c3f0052272a457a = function(arg0) {
|
|
771
777
|
const ret = new Uint8Array(getObject(arg0));
|
|
772
778
|
return addHeapObject(ret);
|
|
773
779
|
};
|
|
774
|
-
imports.wbg.
|
|
780
|
+
imports.wbg.__wbg_set_83db9690f9353e79 = function(arg0, arg1, arg2) {
|
|
775
781
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
776
782
|
};
|
|
777
|
-
imports.wbg.
|
|
783
|
+
imports.wbg.__wbg_length_9e1ae1900cb0fbd5 = function(arg0) {
|
|
778
784
|
const ret = getObject(arg0).length;
|
|
779
785
|
return ret;
|
|
780
786
|
};
|
|
781
|
-
imports.wbg.
|
|
787
|
+
imports.wbg.__wbg_newwithlength_f5933855e4f48a19 = function(arg0) {
|
|
782
788
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
783
789
|
return addHeapObject(ret);
|
|
784
790
|
};
|
|
785
|
-
imports.wbg.
|
|
791
|
+
imports.wbg.__wbg_subarray_58ad4efbb5bcb886 = function(arg0, arg1, arg2) {
|
|
786
792
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
787
793
|
return addHeapObject(ret);
|
|
788
794
|
};
|
|
@@ -794,19 +800,53 @@ async function init(input) {
|
|
|
794
800
|
return addHeapObject(ret);
|
|
795
801
|
};
|
|
796
802
|
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
}
|
|
800
|
-
|
|
803
|
+
return imports;
|
|
804
|
+
}
|
|
801
805
|
|
|
806
|
+
function initMemory(imports, maybe_memory) {
|
|
802
807
|
|
|
803
|
-
|
|
808
|
+
}
|
|
804
809
|
|
|
810
|
+
function finalizeInit(instance, module) {
|
|
805
811
|
wasm = instance.exports;
|
|
806
812
|
init.__wbindgen_wasm_module = module;
|
|
813
|
+
cachedInt32Memory0 = new Int32Array();
|
|
814
|
+
cachedUint8Memory0 = new Uint8Array();
|
|
815
|
+
|
|
807
816
|
|
|
808
817
|
return wasm;
|
|
809
818
|
}
|
|
810
819
|
|
|
811
|
-
|
|
820
|
+
function initSync(module) {
|
|
821
|
+
const imports = getImports();
|
|
822
|
+
|
|
823
|
+
initMemory(imports);
|
|
824
|
+
|
|
825
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
826
|
+
module = new WebAssembly.Module(module);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
830
|
+
|
|
831
|
+
return finalizeInit(instance, module);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
async function init(input) {
|
|
835
|
+
if (typeof input === 'undefined') {
|
|
836
|
+
input = new URL('hpke_dispatch_bg.wasm', import.meta.url);
|
|
837
|
+
}
|
|
838
|
+
const imports = getImports();
|
|
812
839
|
|
|
840
|
+
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
841
|
+
input = fetch(input);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
initMemory(imports);
|
|
845
|
+
|
|
846
|
+
const { instance, module } = await load(await input, imports);
|
|
847
|
+
|
|
848
|
+
return finalizeInit(instance, module);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
export { initSync }
|
|
852
|
+
export default init;
|
|
Binary file
|