renames and tauri app

This commit is contained in:
2026-03-09 17:51:01 +07:00
parent 6ca47336a1
commit 6f4dd88a8e
62 changed files with 5215 additions and 70 deletions
+22
View File
@@ -0,0 +1,22 @@
use hkdf::Hkdf;
use sha2::Sha256;
pub struct HKDF;
impl HKDF {
pub fn extract_key(salt: &[u8], ikm: &[u8]) -> Hkdf<Sha256> {
let extracted_key = Hkdf::<Sha256>::new(Some(salt), ikm);
extracted_key
}
pub fn expand_key<const N: usize>(
extracted_key: &Hkdf<Sha256>,
mark: &[u8],
) -> Result<[u8; N], String> {
let mut expanded_key: [u8; N] = [0u8; N];
extracted_key
.expand(mark, &mut expanded_key)
.map_err(|e| e.to_string())?;
Ok(expanded_key)
}
}