Faker C++
Loading...
Searching...
No Matches
faker::crypto Namespace Reference

Functions

FAKER_CXX_EXPORT std::string sha256 (std::optional< std::string >=std::nullopt)
 Returns a random SHA256 hash or hash of provided data.
 
FAKER_CXX_EXPORT std::string md5 (std::optional< std::string >=std::nullopt)
 Returns a random MD5 hash or hash of provided data.
 

Function Documentation

◆ md5()

FAKER_CXX_EXPORT std::string faker::crypto::md5 ( std::optional< std::string > = std::nullopt)

Returns a random MD5 hash or hash of provided data.

Returns
MD5 hash string.
faker::crypto::md5("hello world") // "5eb63bbbe01eeed093cb22bb8f5acdc3"
faker::crypto::md5() // Random hash of random word
FAKER_CXX_EXPORT std::string md5(std::optional< std::string >=std::nullopt)
Returns a random MD5 hash or hash of provided data.
Definition airline.h:9

◆ sha256()

FAKER_CXX_EXPORT std::string faker::crypto::sha256 ( std::optional< std::string > = std::nullopt)

Returns a random SHA256 hash or hash of provided data.

Returns
SHA256 hash string.
faker::crypto::sha256("hello world") // "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
faker::crypto::sha256() // Random hash of random
FAKER_CXX_EXPORT std::string sha256(std::optional< std::string >=std::nullopt)
Returns a random SHA256 hash or hash of provided data.