feat: add admin user api

This commit is contained in:
weisd
2025-01-13 17:25:15 +08:00
parent bfe8c5e9bf
commit 4d9eca1667
20 changed files with 597 additions and 55 deletions
+3
View File
@@ -44,6 +44,9 @@ fn encrypt<T: aes_gcm::aead::Aead>(
use crate::error::Error;
let nonce = T::generate_nonce(rand::thread_rng());
println!("encrypt nonce len {}, {:?}", nonce.len(), &id);
let encryptor = stream.encrypt(&nonce, data).map_err(Error::ErrEncryptFailed)?;
let mut ciphertext = Vec::with_capacity(salt.len() + 1 + nonce.len() + encryptor.len());