refactor: use aes encrypt function

This commit is contained in:
Sebastian Pravda 2022-10-30 13:40:08 +01:00
parent c417abaa6a
commit 8b26c14e8c
No known key found for this signature in database
GPG key ID: F3BC84F08EFA3F57

View file

@ -17,7 +17,7 @@ impl Mutation {
// TODO: unwrap pro testing..
let hashed_password = hash_password(plain_text_password.to_string()).await.unwrap();
let (pubkey, priv_key_plain_text) = crypto::create_identity();
let encrypted_priv_key = crypto::encrypt_password_age(&priv_key_plain_text, &plain_text_password.to_string()).await.unwrap();
let encrypted_priv_key = crypto::encrypt_password(priv_key_plain_text, plain_text_password.to_string()).await.unwrap();
let encrypted_personal_id_number = crypto::encrypt_password_with_recipients(
&personal_id_number, vec![&pubkey]