AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Hash.h
1
6#pragma once
7
8#include <aws/core/Core_EXPORTS.h>
9#include <aws/core/utils/crypto/HashResult.h>
10#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12
13namespace Aws
14{
15 namespace Utils
16 {
17 namespace Crypto
18 {
22 class AWS_CORE_API Hash
23 {
24 public:
25
26 Hash() {}
27 virtual ~Hash() {}
28
32 virtual HashResult Calculate(const Aws::String& str) = 0;
33
37 virtual HashResult Calculate(Aws::IStream& stream) = 0;
38
42 virtual void Update(unsigned char*, size_t bufferSize) = 0;
43
47 virtual HashResult GetHash() = 0;
48
49 // when hashing streams, this is the size of our internal buffer we read the stream into
50 static const uint32_t INTERNAL_HASH_STREAM_BUFFER_SIZE = 8192;
51 };
52
57 class AWS_CORE_API HashFactory
58 {
59 public:
60 virtual ~HashFactory() {}
61
65 virtual std::shared_ptr<Hash> CreateImplementation() const = 0;
66
71 virtual void InitStaticState() {}
72
77 virtual void CleanupStaticState() {}
78 };
79
80 } // namespace Crypto
81 } // namespace Utils
82} // namespace Aws
83
virtual std::shared_ptr< Hash > CreateImplementation() const =0
virtual void CleanupStaticState()
Definition Hash.h:77
virtual void InitStaticState()
Definition Hash.h:71
virtual HashResult GetHash()=0
virtual void Update(unsigned char *, size_t bufferSize)=0
virtual HashResult Calculate(const Aws::String &str)=0
virtual HashResult Calculate(Aws::IStream &stream)=0
std::basic_istream< char, std::char_traits< char > > IStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition AWSString.h:97