-
-
Save Ashoat/05df46e9eef8bc20b3668988198b3ec8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/web/crypto/opaque-utils.js b/web/crypto/opaque-utils.js | |
index 6cb71791f..4c3dfb4fb 100644 | |
--- a/web/crypto/opaque-utils.js | |
+++ b/web/crypto/opaque-utils.js | |
@@ -1,12 +1,12 @@ | |
// @flow | |
-import initOpaqueKe from '@commapp/opaque-ke-wasm'; | |
+import initOpaqueKe, { Registration } from '@commapp/opaque-ke-wasm'; | |
declare var opaqueURL: string; | |
let opaqueKeLoadingState: void | true | Promise<void>; | |
-function initOpaque(): Promise<void> { | |
+function initOpaqueBase(): Promise<void> { | |
if (opaqueKeLoadingState === true) { | |
return Promise.resolve(); | |
} | |
@@ -16,4 +16,10 @@ function initOpaque(): Promise<void> { | |
return opaqueKeLoadingState; | |
} | |
+async function initOpaque() { | |
+ await initOpaqueBase(); | |
+ const client_registration = new Registration(); | |
+ const registration_request = client_registration.start('test'); | |
+} | |
+ | |
export { initOpaque }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment