libfilezilla
Classes | Namespaces | Enumerations | Functions
hash.hpp File Reference

Collection of cryptographic hash and MAC functions. More...

#include "libfilezilla.hpp"
#include <vector>
#include <string>
Include dependency graph for hash.hpp:

Go to the source code of this file.

Classes

class  hash_accumulator
 Accumulator for hashing large amounts of data. More...
 

Namespaces

 fz
 The namespace used by libfilezilla.
 

Enumerations

enum class  hash_algorithm { md5 , sha1 , sha256 , sha512 }
 List of supported hashing algorithms.
 

Functions

std::vector< uint8_t > md5 (std::string_view const &data)
 Standard MD5. More...
 
std::vector< uint8_t > md5 (std::vector< uint8_t > const &data)
 
std::vector< uint8_t > sha256 (std::string_view const &data)
 Standard SHA256.
 
std::vector< uint8_t > sha256 (std::vector< uint8_t > const &data)
 
std::vector< uint8_t > hmac_sha1 (std::string_view const &key, std::string_view const &data)
 Standard HMAC using SHA1. More...
 
std::vector< uint8_t > hmac_sha1 (std::vector< uint8_t > const &key, std::vector< uint8_t > const &data)
 
std::vector< uint8_t > hmac_sha1 (std::vector< uint8_t > const &key, std::string_view const &data)
 
std::vector< uint8_t > hmac_sha1 (std::string_view const &key, std::vector< uint8_t > const &data)
 
std::vector< uint8_t > hmac_sha256 (std::string_view const &key, std::string_view const &data)
 Standard HMAC using SHA256.
 
std::vector< uint8_t > hmac_sha256 (std::vector< uint8_t > const &key, std::vector< uint8_t > const &data)
 
std::vector< uint8_t > hmac_sha256 (std::vector< uint8_t > const &key, std::string_view const &data)
 
std::vector< uint8_t > hmac_sha256 (std::string_view const &key, std::vector< uint8_t > const &data)
 
std::vector< uint8_t > pbkdf2_hmac_sha256 (std::basic_string_view< uint8_t > const &password, std::basic_string_view< uint8_t > const &salt, size_t length, unsigned int iterations)
 
template<typename PasswordContainer , typename SaltContainer , std::enable_if_t< sizeof(typename PasswordContainer::value_type)==sizeof(uint8_t) &&sizeof(typename SaltContainer::value_type)==sizeof(uint8_t)> * = nullptr>
std::vector< uint8_t > pbkdf2_hmac_sha256 (PasswordContainer const &password, SaltContainer const &salt, size_t length, unsigned int iterations)
 

Detailed Description

Collection of cryptographic hash and MAC functions.