https://slides.com/fidoalliance/jan-2018-fido-seminar-webauthn-tutorial#/5/0/4
Get username and name(password field is obsolete, lol) Send them to the server Server responds with challenge
https://slides.com/fidoalliance/jan-2018-fido-seminar-webauthn-tutorial#/5/0/4
Get username and name(password field is obsolete, lol) Send them to the server Server responds with challenge
fetch('factorial.wasm') | |
//getting WASM Module from response | |
.then(response => response.arrayBuffer()) | |
//instantiating WASM instance from WASM Module | |
.then(bytes => WebAssembly.instantiate(bytes)) | |
//using exported factorial fn from WASM Instance | |
.then(results => { | |
console.log(results.instance.exports.factorial(12)) | |
}) |
int factorial(int n) | |
{ | |
if(n > 1) | |
return n * factorial(n - 1); | |
else | |
return 1; | |
} |
int squareMe (int n) { | |
return n * n; | |
} |
(module | |
(table 0 anyfunc) | |
(memory $0 1) | |
(export "memory" (memory $0)) | |
(export "squareMe" (func $squareMe)) | |
(func $squareMe (; 0 ;) (param $0 i32) (result i32) | |
(i32.mul | |
(get_local $0) | |
(get_local $0) | |
) |
(module | |
(table 0 anyfunc) | |
(memory $0 1) | |
(export "memory" (memory $0)) | |
(export "factorial" (func $factorial)) | |
(func $factorial (; 0 ;) (param $0 i32) (result i32) | |
(local $1 i32) | |
(local $2 i32) | |
(set_local $2 | |
(i32.const 1) |