SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
sourcepp::crypto Namespace Reference

Functions

uint32_t computeAdler32 (std::span< const std::byte > buffer)
 
uint32_t computeCRC32 (std::span< const std::byte > buffer)
 
std::array< std::byte, 16 > computeMD5 (std::span< const std::byte > buffer)
 
std::pair< std::string, std::string > computeSHA256KeyPair (uint16_t size=2048)
 
bool verifySHA256PublicKey (std::span< const std::byte > buffer, std::span< const std::byte > publicKey, std::span< const std::byte > signature)
 
std::vector< std::byte > signDataWithSHA256PrivateKey (std::span< const std::byte > buffer, std::span< const std::byte > privateKey)
 
std::vector< std::byte > decodeHexString (std::string_view hex)
 
std::string encodeHexString (std::span< const std::byte > hex)
 

Function Documentation

◆ computeAdler32()

uint32_t sourcepp::crypto::computeAdler32 ( std::span< const std::byte >  buffer)

Definition at line 39 of file Adler32.cpp.

◆ computeCRC32()

uint32_t sourcepp::crypto::computeCRC32 ( std::span< const std::byte >  buffer)

Definition at line 7 of file CRC32.cpp.

◆ computeMD5()

std::array< std::byte, 16 > sourcepp::crypto::computeMD5 ( std::span< const std::byte >  buffer)

Definition at line 8 of file MD5.cpp.

◆ computeSHA256KeyPair()

std::pair< std::string, std::string > sourcepp::crypto::computeSHA256KeyPair ( uint16_t  size = 2048)

Definition at line 9 of file RSA.cpp.

◆ decodeHexString()

std::vector< std::byte > sourcepp::crypto::decodeHexString ( std::string_view  hex)

Definition at line 10 of file String.cpp.

◆ encodeHexString()

std::string sourcepp::crypto::encodeHexString ( std::span< const std::byte >  hex)

Definition at line 21 of file String.cpp.

◆ signDataWithSHA256PrivateKey()

std::vector< std::byte > sourcepp::crypto::signDataWithSHA256PrivateKey ( std::span< const std::byte >  buffer,
std::span< const std::byte >  privateKey 
)

Definition at line 38 of file RSA.cpp.

◆ verifySHA256PublicKey()

bool sourcepp::crypto::verifySHA256PublicKey ( std::span< const std::byte >  buffer,
std::span< const std::byte >  publicKey,
std::span< const std::byte >  signature 
)

Definition at line 30 of file RSA.cpp.