2#ifndef _aspose_cryptography_hash_algorithm_h_
3#define _aspose_cryptography_hash_algorithm_h_
5#include "i_crypto_transform.h"
6#include "system/exceptions.h"
7#include "system/array.h"
8#include "system/io/stream.h"
10#ifdef ASPOSECPPLIB_BEING_BUILT
11#include <botan/hash.h>
19 ASPOSECPP_3RD_PARTY_CLASS(HashFunction);
23namespace System{
namespace Security{
namespace Cryptography{
91 ASPOSECPP_SHARED_API
HashAlgorithm( std::unique_ptr<Botan::HashFunction> hash_function );
104 std::unique_ptr<Botan::HashFunction> m_bt_hash_function;
106 std::vector<uint8_t> m_hash_value;
Base class for hashing algorithms. Objects of this class should only be allocated using System::MakeO...
Definition: hash_algorithm.h:30
int get_OutputBlockSize() override
Output block size.
ArrayPtr< uint8_t > ComputeHash(const ArrayPtr< uint8_t > &buffer)
Hashes buffer.
int get_InputBlockSize() override
Input block size.
virtual ArrayPtr< uint8_t > get_Hash()
Gets value of calculated hash code.
ArrayPtr< uint8_t > ComputeHash(SharedPtr< IO::Stream > const &inputStream)
Reads stream until end and calculates hash for the data read.
HashAlgorithm()
Constructor.
ArrayPtr< uint8_t > ComputeHash(const ArrayPtr< uint8_t > &buffer, int offset, int count)
Hashes buffer slice.
virtual void HashCore(System::ArrayPtr< uint8_t > array, int32_t ibStart, int32_t cbSize)
Passes data which is written into the object to the actual hash algorithm.
virtual int get_HashSize()
Gets size of calculated hash value in bytes.
ArrayPtr< uint8_t > TransformFinalBlock(ArrayPtr< uint8_t > inputBuffer, int inputOffset, int inputCount) override
Processes last block of data and calculates hash.
virtual System::ArrayPtr< uint8_t > HashFinal()
Finishes hash calculation.
HashAlgorithm(std::unique_ptr< Botan::HashFunction > hash_function)
Constructor.
virtual void Initialize()
Resets hasher into initial state.
virtual ~HashAlgorithm()
Destructor.
int HashSizeValue
Size of computed hash code, in bits.
Definition: hash_algorithm.h:85
static SharedPtr< HashAlgorithm > Create(const String &hashName)
Creates hash algorithm based on name.
int TransformBlock(ArrayPtr< uint8_t > inputBuffer, int inputOffset, int inputCount, ArrayPtr< uint8_t > outputBuffer, int outputOffset) override
Processes block of data and copies data to output array.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Definition: db_command.h:9