AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
CRC32.h
1
6/*
7* Interface for CRC32 and CRC32C
8*/
9#pragma once
10
11#ifdef __APPLE__
12
13#ifdef __clang__
14#pragma clang diagnostic ignored "-Wdeprecated-declarations"
15#endif // __clang__
16
17#ifdef __GNUC__
18#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
19#endif // __GNUC__
20
21#endif // __APPLE__
22
23#include <aws/core/Core_EXPORTS.h>
24
25#include <aws/core/utils/crypto/Hash.h>
26
27namespace Aws
28{
29 namespace Utils
30 {
31 namespace Crypto
32 {
36 class AWS_CORE_API CRC32 : public Hash
37 {
38 public:
43 virtual ~CRC32();
44
48 virtual HashResult Calculate(const Aws::String& str) override;
49
53 virtual HashResult Calculate(Aws::IStream& stream) override;
54
58 virtual void Update(unsigned char* buffer, size_t bufferSize) override;
59
63 virtual HashResult GetHash() override;
64 private:
65
66 std::shared_ptr< Hash > m_hashImpl;
67 };
68
72 class AWS_CORE_API CRC32C : public Hash
73 {
74 public:
79 virtual ~CRC32C();
80
84 virtual HashResult Calculate(const Aws::String& str) override;
85
89 virtual HashResult Calculate(Aws::IStream& stream) override;
90
94 virtual void Update(unsigned char* buffer, size_t bufferSize) override;
95
99 virtual HashResult GetHash() override;
100
101 private:
102
103 std::shared_ptr< Hash > m_hashImpl;
104 };
105
106 class AWS_CORE_API CRC32Impl : public Hash
107 {
108 public:
109
111 virtual ~CRC32Impl() {}
112
113 virtual HashResult Calculate(const Aws::String& str) override;
114
115 virtual HashResult Calculate(Aws::IStream& stream) override;
116
117 virtual void Update(unsigned char* buffer, size_t bufferSize) override;
118
119 virtual HashResult GetHash() override;
120
121 private:
122 int m_runningCrc32;
123 };
124
125 class AWS_CORE_API CRC32CImpl : public Hash
126 {
127 public:
128
130 virtual ~CRC32CImpl() {}
131
132 virtual HashResult Calculate(const Aws::String& str) override;
133
134 virtual HashResult Calculate(Aws::IStream& stream) override;
135
136 virtual void Update(unsigned char* buffer, size_t bufferSize) override;
137
138 virtual HashResult GetHash() override;
139
140 private:
141 int m_runningCrc32c;
142 };
143
144 } // namespace Crypto
145 } // namespace Utils
146} // namespace Aws
147
virtual HashResult Calculate(const Aws::String &str) override
virtual HashResult GetHash() override
virtual HashResult Calculate(Aws::IStream &stream) override
virtual void Update(unsigned char *buffer, size_t bufferSize) override
virtual HashResult Calculate(Aws::IStream &stream) override
virtual HashResult GetHash() override
virtual void Update(unsigned char *buffer, size_t bufferSize) override
virtual HashResult Calculate(const Aws::String &str) override
virtual HashResult Calculate(const Aws::String &str) override
virtual HashResult GetHash() override
virtual void Update(unsigned char *buffer, size_t bufferSize) override
virtual HashResult Calculate(Aws::IStream &stream) override
virtual HashResult Calculate(Aws::IStream &stream) override
virtual void Update(unsigned char *buffer, size_t bufferSize) override
virtual HashResult Calculate(const Aws::String &str) override
virtual HashResult GetHash() override
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