1#ifndef TENDUKE_TEST_MOCKS_MESSAGEDIGESTMOCK_H
2#define TENDUKE_TEST_MOCKS_MESSAGEDIGESTMOCK_H
4#include "crypto/MessageDigest.h"
5#include "crypto/MessageDigestFactory.h"
7#include "gmock/gmock.h"
9namespace tenduke {
namespace test {
namespace mocks {
15 MOCK_METHOD(std::size_t,
length, (), (
const,
override));
17 MOCK_METHOD(
void,
digestTo, (
unsigned char* d), (
override));
18 MOCK_METHOD(std::unique_ptr<tenduke::utl::BinaryData>,
digest, (), (
override));
29void generateFakeSha256Hash(
30 unsigned char * digest,
31 const char * bytesToUse
Creates instances of tenduke::crypto::MessageDigest.
Definition MessageDigestFactory.h:12
virtual std::unique_ptr< MessageDigest > create(MessageDigest::Algorithm algorithm) const =0
Creates a new message digest.
Simple MessageDigest -service.
Definition MessageDigest.h:21
virtual MessageDigest * update(const unsigned char *message, std::size_t messageLength)=0
Updates the digest.
virtual std::unique_ptr< tenduke::utl::BinaryData > digest()=0
Computes the digest.
virtual std::size_t length() const =0
Returns length (in bytes) of the resulting digest.
virtual void digestTo(unsigned char *messageDigest)=0
Computes the digest to pre-allocated buffer.
Algorithm
Supported algorithms.
Definition MessageDigest.h:24
Definition MessageDigestMock.h:23
Definition MessageDigestMock.h:13
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4