From 6ddfaebe3ed45edb01d8c188fc5449b366ddcf55 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 13:35:06 +0300 Subject: Remove lorems and inpsumses --- src/handlers.rs | 2 +- src/schema.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/handlers.rs b/src/handlers.rs index 7135190..5110bd5 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -110,7 +110,7 @@ pub async fn authenticate_user( .expect("failed to decrypt"); // decrypt c using key dec_key - let cipher = Aes128Cbc::new_var(&temp_key, &request.iv).unwrap(); + let cipher = Aes128Cbc::new_var(&temp_key, &request.iv.as_bytes()).unwrap(); let auth_plaintext = cipher .decrypt_vec(&base64::decode(request.c).unwrap()) .unwrap(); diff --git a/src/schema.rs b/src/schema.rs index af10b4d..33dc301 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -195,7 +195,7 @@ pub struct AuthRequest { #[derive(Serialize, Deserialize, Debug)] pub struct InitialAuthRequest { pub c: String, - pub iv: [u8; 32], + pub iv: String, pub key: String, } -- cgit v1.2.3-70-g09d2