AWS SDK for C++  0.14.3
AWS SDK for C++
HMAC.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 #include <aws/core/Core_EXPORTS.h>
22 
23 #include <aws/core/utils/Array.h>
25 
26 namespace Aws
27 {
28  namespace Utils
29  {
30  namespace Crypto
31  {
36  {
37  public:
38  HMAC() {};
39  virtual ~HMAC() {};
40 
44  virtual HashResult Calculate(const Aws::Utils::ByteBuffer& toSign, const Aws::Utils::ByteBuffer& secret) = 0;
45 
46  };
47 
53  {
54  public:
55  virtual ~HMACFactory() {}
56 
60  virtual std::shared_ptr<HMAC> CreateImplementation() const = 0;
61 
66  virtual void InitStaticState() {}
67 
72  virtual void CleanupStaticState() {}
73  };
74 
75  } // namespace Crypto
76  } // namespace Utils
77 } // namespace Aws
78 
virtual void CleanupStaticState()
Definition: HMAC.h:72
virtual void InitStaticState()
Definition: HMAC.h:66
virtual ~HMAC()
Definition: HMAC.h:39
#define AWS_CORE_API
Definition: Core_EXPORTS.h:35
JSON (JavaScript Object Notation).