Passwordfile library 5.0.12
C++ library to read/write passwords from/to encrypted files
Loading...
Searching...
No Matches
Util::OpenSsl Namespace Reference

Contains functions utilizing the usage of OpenSSL. More...

Classes

struct  Sha256Sum
 

Functions

PASSWORD_FILE_EXPORT void init ()
 Initializes OpenSSL.
 
PASSWORD_FILE_EXPORT void clean ()
 Cleans resources of OpenSSL.
 
PASSWORD_FILE_EXPORT Sha256Sum computeSha256Sum (const unsigned char *buffer, std::size_t size)
 Computes a SHA-256 sum using OpenSSL.
 
PASSWORD_FILE_EXPORT std::uint32_t generateRandomNumber (std::uint32_t min, std::uint32_t max)
 
uint32_t generateRandomNumber (uint32_t min, uint32_t max)
 Generates a random number using OpenSSL.
 

Detailed Description

Contains functions utilizing the usage of OpenSSL.

Function Documentation

◆ clean()

void Util::OpenSsl::clean ( )

Cleans resources of OpenSSL.

Definition at line 39 of file openssl.cpp.

◆ computeSha256Sum()

Sha256Sum Util::OpenSsl::computeSha256Sum ( const unsigned char * buffer,
std::size_t size )

Computes a SHA-256 sum using OpenSSL.

Definition at line 50 of file openssl.cpp.

◆ generateRandomNumber() [1/2]

PASSWORD_FILE_EXPORT std::uint32_t Util::OpenSsl::generateRandomNumber ( std::uint32_t min,
std::uint32_t max )

◆ generateRandomNumber() [2/2]

uint32_t Util::OpenSsl::generateRandomNumber ( uint32_t min,
uint32_t max )

Generates a random number using OpenSSL.

Definition at line 60 of file openssl.cpp.

◆ init()

void Util::OpenSsl::init ( )

Initializes OpenSSL.

Definition at line 28 of file openssl.cpp.