mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
refactor: use aes encrypt function
This commit is contained in:
parent
c417abaa6a
commit
8b26c14e8c
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ impl Mutation {
|
||||||
// TODO: unwrap pro testing..
|
// TODO: unwrap pro testing..
|
||||||
let hashed_password = hash_password(plain_text_password.to_string()).await.unwrap();
|
let hashed_password = hash_password(plain_text_password.to_string()).await.unwrap();
|
||||||
let (pubkey, priv_key_plain_text) = crypto::create_identity();
|
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(
|
let encrypted_personal_id_number = crypto::encrypt_password_with_recipients(
|
||||||
&personal_id_number, vec![&pubkey]
|
&personal_id_number, vec![&pubkey]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue