From 8de6e7152244186c15c7acbfa679c98518ae018e Mon Sep 17 00:00:00 2001 From: Jonathan Ngbonga Date: Thu, 13 May 2021 20:08:17 +0200 Subject: [PATCH 01/39] more interfaces --- src/utils/cryptography.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/utils/cryptography.ts b/src/utils/cryptography.ts index bb13a29..9dca74f 100644 --- a/src/utils/cryptography.ts +++ b/src/utils/cryptography.ts @@ -6,15 +6,19 @@ import util from "tweetnacl-util"; export type Base64 = string; +export interface MessageData { + ourPublicKey: Base64; + nonce: Base64; + ciphertext: Base64; +} + +export interface OurData { + ourSecretKey: Base64; +} + export interface EncryptedMessage { - readonly ourData: { - ourSecretKey: Base64; - }; - readonly messageData: { - ourPublicKey: Base64; - nonce: Base64; - ciphertext: Base64; - }; + readonly ourData: OurData; + readonly messageData: MessageData; } /** From 8c0acd9a664db2bb4e7732382724bd4cda4b685e Mon Sep 17 00:00:00 2001 From: Jonathan Ngbonga Date: Thu, 13 May 2021 20:08:29 +0200 Subject: [PATCH 02/39] post messageData --- src/components/AccessForm.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/AccessForm.vue b/src/components/AccessForm.vue index 17484f1..d312025 100644 --- a/src/components/AccessForm.vue +++ b/src/components/AccessForm.vue @@ -39,7 +39,7 @@