aws-crt-cpp
Classes | Functions
Aws::Crt::Crypto Namespace Reference

Classes

class  Hash
 
class  HMAC
 

Functions

bool AWS_CRT_CPP_API ComputeSHA256 (Allocator *allocator, const ByteCursor &input, ByteBuf &output, size_t truncateTo=0) noexcept
 
bool AWS_CRT_CPP_API ComputeSHA256 (const ByteCursor &input, ByteBuf &output, size_t truncateTo=0) noexcept
 
bool AWS_CRT_CPP_API ComputeMD5 (Allocator *allocator, const ByteCursor &input, ByteBuf &output, size_t truncateTo=0) noexcept
 
bool AWS_CRT_CPP_API ComputeMD5 (const ByteCursor &input, ByteBuf &output, size_t truncateTo=0) noexcept
 
bool AWS_CRT_CPP_API ComputeSHA256HMAC (Allocator *allocator, const ByteCursor &secret, const ByteCursor &input, ByteBuf &output, size_t truncateTo=0) noexcept
 
bool AWS_CRT_CPP_API ComputeSHA256HMAC (const ByteCursor &secret, const ByteCursor &input, ByteBuf &output, size_t truncateTo=0) noexcept
 

Function Documentation

◆ ComputeMD5() [1/2]

bool Aws::Crt::Crypto::ComputeMD5 ( Allocator allocator,
const ByteCursor input,
ByteBuf output,
size_t  truncateTo = 0 
)
noexcept

Computes a MD5 Hash over input, and writes the digest to output. If truncateTo is non-zero, the digest will be truncated to the value of truncateTo. Returns true on success. If this function fails, Aws::Crt::LastError() will contain the error that occurred. Unless you're using 'truncateTo', output should have a minimum capacity of MD5_DIGEST_SIZE.

◆ ComputeMD5() [2/2]

bool Aws::Crt::Crypto::ComputeMD5 ( const ByteCursor input,
ByteBuf output,
size_t  truncateTo = 0 
)
noexcept

Computes a MD5 Hash using the default allocator over input, and writes the digest to output. If truncateTo is non-zero, the digest will be truncated to the value of truncateTo. Returns true on success. If this function fails, Aws::Crt::LastError() will contain the error that occurred. Unless you're using 'truncateTo', output should have a minimum capacity of MD5_DIGEST_SIZE.

◆ ComputeSHA256() [1/2]

bool Aws::Crt::Crypto::ComputeSHA256 ( Allocator allocator,
const ByteCursor input,
ByteBuf output,
size_t  truncateTo = 0 
)
noexcept

Computes a SHA256 Hash over input, and writes the digest to output. If truncateTo is non-zero, the digest will be truncated to the value of truncateTo. Returns true on success. If this function fails, Aws::Crt::LastError() will contain the error that occurred. Unless you're using 'truncateTo', output should have a minimum capacity of SHA256_DIGEST_SIZE.

◆ ComputeSHA256() [2/2]

bool Aws::Crt::Crypto::ComputeSHA256 ( const ByteCursor input,
ByteBuf output,
size_t  truncateTo = 0 
)
noexcept

Computes a SHA256 Hash using the default allocator over input, and writes the digest to output. If truncateTo is non-zero, the digest will be truncated to the value of truncateTo. Returns true on success. If this function fails, Aws::Crt::LastError() will contain the error that occurred. Unless you're using 'truncateTo', output should have a minimum capacity of SHA256_DIGEST_SIZE.

◆ ComputeSHA256HMAC() [1/2]

bool Aws::Crt::Crypto::ComputeSHA256HMAC ( Allocator allocator,
const ByteCursor secret,
const ByteCursor input,
ByteBuf output,
size_t  truncateTo = 0 
)
noexcept

Computes a SHA256 HMAC with secret over input, and writes the digest to output. If truncateTo is non-zero, the digest will be truncated to the value of truncateTo. Returns true on success. If this function fails, Aws::Crt::LastError() will contain the error that occurred. Unless you're using 'truncateTo', output should have a minimum capacity of SHA256_HMAC_DIGEST_SIZE.

◆ ComputeSHA256HMAC() [2/2]

bool Aws::Crt::Crypto::ComputeSHA256HMAC ( const ByteCursor secret,
const ByteCursor input,
ByteBuf output,
size_t  truncateTo = 0 
)
noexcept

Computes a SHA256 HMAC using the default allocator with secret over input, and writes the digest to output. If truncateTo is non-zero, the digest will be truncated to the value of truncateTo. Returns true on success. If this function fails, Aws::Crt::LastError() will contain the error that occurred. Unless you're using 'truncateTo', output should have a minimum capacity of SHA256_HMAC_DIGEST_SIZE.