diff options
author | Yigit Sever | 2021-04-15 13:35:06 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-15 13:35:06 +0300 |
commit | 6ddfaebe3ed45edb01d8c188fc5449b366ddcf55 (patch) | |
tree | 3109e4e703627a7967471d88949b96fd6a9723eb /src | |
parent | 44c9e85fb2440e397514d5103f4647155ba5611b (diff) | |
download | gradecoin-6ddfaebe3ed45edb01d8c188fc5449b366ddcf55.tar.gz gradecoin-6ddfaebe3ed45edb01d8c188fc5449b366ddcf55.tar.bz2 gradecoin-6ddfaebe3ed45edb01d8c188fc5449b366ddcf55.zip |
Remove lorems and inpsumses
Diffstat (limited to 'src')
-rw-r--r-- | src/handlers.rs | 2 | ||||
-rw-r--r-- | src/schema.rs | 2 |
2 files changed, 2 insertions, 2 deletions
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( | |||
110 | .expect("failed to decrypt"); | 110 | .expect("failed to decrypt"); |
111 | 111 | ||
112 | // decrypt c using key dec_key | 112 | // decrypt c using key dec_key |
113 | let cipher = Aes128Cbc::new_var(&temp_key, &request.iv).unwrap(); | 113 | let cipher = Aes128Cbc::new_var(&temp_key, &request.iv.as_bytes()).unwrap(); |
114 | let auth_plaintext = cipher | 114 | let auth_plaintext = cipher |
115 | .decrypt_vec(&base64::decode(request.c).unwrap()) | 115 | .decrypt_vec(&base64::decode(request.c).unwrap()) |
116 | .unwrap(); | 116 | .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 { | |||
195 | #[derive(Serialize, Deserialize, Debug)] | 195 | #[derive(Serialize, Deserialize, Debug)] |
196 | pub struct InitialAuthRequest { | 196 | pub struct InitialAuthRequest { |
197 | pub c: String, | 197 | pub c: String, |
198 | pub iv: [u8; 32], | 198 | pub iv: String, |
199 | pub key: String, | 199 | pub key: String, |
200 | } | 200 | } |
201 | 201 | ||