Module key

Module key 

Source
Expand description

This module handles key-related functionality within dexios-core

It contains methods for argon2id and balloon hashing, and securely generating a salt

§Examples

let salt = gen_salt();
let secret_data = "secure key".as_bytes().to_vec();
let raw_key = Protected::new(secret_data);
let key = argon2id_hash(raw_key, &salt, &HeaderVersion::V3).unwrap();

Functions§

argon2id_hash
This handles argon2id hashing of a raw key
balloon_hash
This handles BLAKE3-Balloon hashing of a raw key
decrypt_master_key
This is a helper function for retrieving the key used for encrypting the data
generate_passphrase
This function is used for autogenerating a passphrase, from a wordlist
vec_to_arr
This is a simple helper function, used for converting the 32-byte master key Vec<u8>s to [u8; 32]