forked from mirrors/gecko-dev
Bug 1724871 - P2: Update ODOH to version 1, r=necko-reviewers,valentin
Depends on D122252 Differential Revision: https://phabricator.services.mozilla.com/D122253
This commit is contained in:
parent
d289199bd1
commit
b38ee4d69d
5 changed files with 13 additions and 7 deletions
|
|
@ -156,7 +156,7 @@ union NetAddr {
|
||||||
bool ToStringBuffer(char* buf, uint32_t bufSize) const;
|
bool ToStringBuffer(char* buf, uint32_t bufSize) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ODOH_VERSION 0xff06
|
#define ODOH_VERSION 0x0001
|
||||||
static const char kODoHQuery[] = "odoh query";
|
static const char kODoHQuery[] = "odoh query";
|
||||||
static const char hODoHConfigID[] = "odoh key id";
|
static const char hODoHConfigID[] = "odoh key id";
|
||||||
static const char kODoHResponse[] = "odoh response";
|
static const char kODoHResponse[] = "odoh response";
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,12 @@ cd my-project
|
||||||
wasm-pack build
|
wasm-pack build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 🛠️ Build a module that can be used for nodejs
|
||||||
|
|
||||||
|
```
|
||||||
|
wasm-pack build --target nodejs
|
||||||
|
```
|
||||||
|
|
||||||
### 🔬 Test in Headless Browsers with `wasm-pack test`
|
### 🔬 Test in Headless Browsers with `wasm-pack test`
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
let imports = {};
|
let imports = {};
|
||||||
imports['__wbindgen_placeholder__'] = module.exports;
|
imports['__wbindgen_placeholder__'] = module.exports;
|
||||||
let wasm;
|
let wasm;
|
||||||
const { TextDecoder } = require(String.raw`util`);
|
const { TextDecoder } = require(`util`);
|
||||||
|
|
||||||
const heap = new Array(32).fill(undefined);
|
const heap = new Array(32).fill(undefined);
|
||||||
|
|
||||||
|
|
@ -93,22 +93,22 @@ module.exports.__wbg_log_b3f203d9e6882397 = function(arg0, arg1) {
|
||||||
console.log(getStringFromWasm0(arg0, arg1));
|
console.log(getStringFromWasm0(arg0, arg1));
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.__wbg_buffer_ebc6c8e75510eae3 = function(arg0) {
|
module.exports.__wbg_buffer_eb2155f17856c20b = function(arg0) {
|
||||||
var ret = getObject(arg0).buffer;
|
var ret = getObject(arg0).buffer;
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.__wbg_newwithbyteoffsetandlength_ca3d3d8811ecb569 = function(arg0, arg1, arg2) {
|
module.exports.__wbg_newwithbyteoffsetandlength_7d07f77c6d0d8e26 = function(arg0, arg1, arg2) {
|
||||||
var ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
var ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.__wbg_new_135e963dedf67b22 = function(arg0) {
|
module.exports.__wbg_new_ff8b26f7b2d7e2fb = function(arg0) {
|
||||||
var ret = new Uint8Array(getObject(arg0));
|
var ret = new Uint8Array(getObject(arg0));
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.__wbg_newwithlength_78dc302d31527318 = function(arg0) {
|
module.exports.__wbg_newwithlength_a49b32b2030b93c3 = function(arg0) {
|
||||||
var ret = new Uint8Array(arg0 >>> 0);
|
var ret = new Uint8Array(arg0 >>> 0);
|
||||||
return addHeapObject(ret);
|
return addHeapObject(ret);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -21,7 +21,7 @@ pub type Kem = X25519HkdfSha256;
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
|
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
|
||||||
|
|
||||||
pub const ODOH_VERSION: u16 = 0xff06;
|
pub const ODOH_VERSION: u16 = 0x0001;
|
||||||
const KEM_ID: u16 = 0x0020;
|
const KEM_ID: u16 = 0x0020;
|
||||||
const KDF_ID: u16 = 0x0001;
|
const KDF_ID: u16 = 0x0001;
|
||||||
const AEAD_ID: u16 = 0x0001;
|
const AEAD_ID: u16 = 0x0001;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue