AWS SDK for C++  1.9.21
AWS SDK for C++
Hash.h
Go to the documentation of this file.
1 
6 #pragma once
7 
12 
13 namespace Aws
14 {
15  namespace Utils
16  {
17  namespace Crypto
18  {
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 
39  // when hashing streams, this is the size of our internal buffer we read the stream into
40  static const uint32_t INTERNAL_HASH_STREAM_BUFFER_SIZE = 8192;
41  };
42 
48  {
49  public:
50  virtual ~HashFactory() {}
51 
55  virtual std::shared_ptr<Hash> CreateImplementation() const = 0;
56 
61  virtual void InitStaticState() {}
62 
67  virtual void CleanupStaticState() {}
68  };
69 
70  } // namespace Crypto
71  } // namespace Utils
72 } // namespace Aws
73 
AWS_CORE_API
#define AWS_CORE_API
Definition: Core_EXPORTS.h:25
Aws::Utils::Crypto::HashFactory
Definition: Hash.h:48
Aws::Utils::Crypto::Hash
Definition: Hash.h:23
Aws::IStream
std::basic_istream< char, std::char_traits< char > > IStream
Definition: AWSStreamFwd.h:20
AWSStreamFwd.h
Aws::Utils::Crypto::Hash::~Hash
virtual ~Hash()
Definition: Hash.h:27
Aws::Utils::Crypto::Hash::Calculate
virtual HashResult Calculate(const Aws::String &str)=0
Aws::Utils::Crypto::HashFactory::~HashFactory
virtual ~HashFactory()
Definition: Hash.h:50
Aws::Utils::Crypto::Hash::Hash
Hash()
Definition: Hash.h:26
HashResult.h
Aws::Utils::Crypto::Hash::Calculate
virtual HashResult Calculate(Aws::IStream &stream)=0
AWSString.h
Core_EXPORTS.h
Aws::Utils::Crypto::HashFactory::CreateImplementation
virtual std::shared_ptr< Hash > CreateImplementation() const =0
Aws
Definition: AccessManagementClient.h:15
Aws::Utils::Crypto::HashFactory::CleanupStaticState
virtual void CleanupStaticState()
Definition: Hash.h:67
Aws::Utils::Outcome
Definition: Outcome.h:26
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Utils::Crypto::HashFactory::InitStaticState
virtual void InitStaticState()
Definition: Hash.h:61