11#ifndef __DECAF_SHA512_HXX__
12#define __DECAF_SHA512_HXX__
15#include <decaf/sha512.h>
19#if __cplusplus >= 201103L
20 #define DECAF_NOEXCEPT noexcept
22 #define DECAF_NOEXCEPT throw()
A reference to a block of data, which (when accessed through this base class) is const.
Definition secure_buffer.hxx:159
const unsigned char * data() const DECAF_NOEXCEPT
Get const data.
Definition secure_buffer.hxx:199
size_t size() const DECAF_NOEXCEPT
Get the size.
Definition secure_buffer.hxx:208
A reference to a writable block of data.
Definition secure_buffer.hxx:270
A fixed-size block.
Definition secure_buffer.hxx:253
An exception for when crypto (ie point decode) has failed.
Definition secure_buffer.hxx:126
SHA512 wrapper function.
Definition sha512.hxx:29
SHA512 & operator<<(const Block &s)
Add more data, stream version.
Definition sha512.hxx:56
static SecureBuffer hash(const Block &message, size_t outlen=OUTPUT_BYTES)
Hash a message in one pass.
Definition sha512.hxx:85
void reset() DECAF_NOEXCEPT
Resets the SHA context.
Definition sha512.hxx:68
static const size_t DEFAULT_OUTPUT_BYTES
Default number of bytes to output.
Definition sha512.hxx:44
void update(const uint8_t *__restrict__ in, size_t len) DECAF_NOEXCEPT
Add more data to running hash.
Definition sha512.hxx:50
void update(const Block &s) DECAF_NOEXCEPT
Add more data to running hash, C++ version.
Definition sha512.hxx:53
size_t max_output_size() const DECAF_NOEXCEPT
Return the sponge's maximum output size.
Definition sha512.hxx:82
~SHA512() DECAF_NOEXCEPT
Destructor zeroizes state.
Definition sha512.hxx:96
static const size_t OUTPUT_BYTES
Number of bytes ouf output.
Definition sha512.hxx:38
SHA512 & operator+=(const Block &s)
Same as <<.
Definition sha512.hxx:59
size_t default_output_size() const DECAF_NOEXCEPT
Return the sponge's default output size.
Definition sha512.hxx:79
static const size_t MAX_OUTPUT_BYTES
Number of bytes of output.
Definition sha512.hxx:41
SHA512() DECAF_NOEXCEPT
Constructor.
Definition sha512.hxx:47
Namespace for all C++ decaf objects.
Definition decaf.hxx:22
std::vector< unsigned char, SanitizingAllocator< unsigned char, 0 > > SecureBuffer
A variant of std::vector which securely zerozes its state when destructed.
Definition secure_buffer.hxx:79
C++ self-zeroizing buffer.