Module devolutions_crypto::utils
source · Expand description
Module for utils that does not use any of the Devolutions custom data types.
Functions
- Derives a password or key into a new one using Argon2.
- Derives a password or key into a new one using PBKDF2.
- Returns a random key of the specified length. Can also be used whenever you need a random byte array, like for a salt.
- Temporarly binded here for a specific use case, don’t rely on this. Copied and modified from: https://github.com/RustCrypto/password-hashing/blob/master/scrypt/src/simple.rs Because rand is outdated, I cannot use the crate directly
- Only validate the header to make sure it is valid. Used to quickly determine if the data comes from the library.