[][src]Function lms::file_ops::hash_file_secure

pub fn hash_file_secure<S>(file_to_hash: &S, location: &str) -> Option<Vec<u8>> where
    S: FileOps

Generates a hash of the given file, using the BLAKE2b cryptographic hash function

Arguments

  • file_to_hash: file object to hash
  • location: base directory of the file to hash, such that location + file_to_hash.path() is the absolute path of the file

Returns

  • Some: The hash of the given file
  • Err: If the given file cannot be hashed