AWS SDK for C++  0.12.9
AWS SDK for C++
Sha256.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16  /*
17  * Interface for Sha256 encryptor and hmac
18  */
19 #pragma once
20 
21 #ifdef __APPLE__
22 
23 #ifdef __clang__
24 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
25 #endif // __clang__
26 
27 #ifdef __GNUC__
28 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
29 #endif // __GNUC__
30 
31 #endif // __APPLE__
32 
33 #include <aws/core/Core_EXPORTS.h>
34 
36 
37 namespace Aws
38 {
39  namespace Utils
40  {
41  namespace Crypto
42  {
43  class WindowsHashImpl;
44 
48  class AWS_CORE_API Sha256 : public Hash
49  {
50  public:
54  Sha256();
55  virtual ~Sha256();
56 
60  virtual HashResult Calculate(const Aws::String& str) override;
61 
65  virtual HashResult Calculate(Aws::IStream& stream) override;
66 
67  private:
68 
69  std::shared_ptr< Hash > m_hashImpl;
70  };
71 
72  } // namespace Crypto
73  } // namespace Utils
74 } // namespace Aws
75 
std::basic_istream< char, std::char_traits< char > > IStream
Definition: AWSStreamFwd.h:30
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_CORE_API
Definition: Core_EXPORTS.h:30
JSON (JavaScript Object Notation).