mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-10 23:26:53 +00:00
feat: add admin user api
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -3,6 +3,7 @@ use pbkdf2::pbkdf2_hmac;
|
||||
use sha2::Sha256;
|
||||
|
||||
#[repr(u8)]
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub(crate) enum ID {
|
||||
Argon2idAESGCM = 0x00,
|
||||
Argon2idChaCHa20Poly1305 = 0x01,
|
||||
|
||||
Reference in New Issue
Block a user