1#ifndef TENDUKE_LIBCRYPTO_LIBCRYPTOMESSAGEDIGEST_H
2#define TENDUKE_LIBCRYPTO_LIBCRYPTOMESSAGEDIGEST_H
4#include "crypto/MessageDigest.h"
7#include <openssl/evp.h>
30 std::size_t
length()
const override;
32 const unsigned char * message,
33 std::size_t messageLength
36 std::unique_ptr<tenduke::utl::BinaryData>
digest()
override;
45 const char * algorithmName,
50 const EVP_MD * theDigest;
51 const std::unique_ptr<EVP_MD_CTX,
decltype(EVP_MD_CTX_free) *> ctx;
Simple MessageDigest -service.
Definition MessageDigest.h:21
Libcrypto-implementation of tenduke::crypto::MessageDigest.
Definition LibcryptoMessageDigest.h:19
std::unique_ptr< tenduke::utl::BinaryData > digest() override
Computes the digest.
Definition LibcryptoMessageDigest.cpp:81
MessageDigest * update(const unsigned char *message, std::size_t messageLength) override
Updates the digest.
Definition LibcryptoMessageDigest.cpp:49
void digestTo(unsigned char *digest) override
Computes the digest to pre-allocated buffer.
Definition LibcryptoMessageDigest.cpp:68
std::size_t length() const override
Returns length (in bytes) of the resulting digest.
Definition LibcryptoMessageDigest.cpp:43
libcrypto based implementations of cryptography services.
Definition AsymmetricMessageDigest.h:15
const char *const ALGORITHM_SHA256
Libcrypto name for SHA256.
Definition LibcryptoMessageDigest.h:12
Cryptography services.
Definition CryptoException.h:7
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4