1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 
7 #include <aws/core/utils/crypto/Sha256HMAC.h>
8 #include <aws/core/utils/crypto/Factories.h>
9 #include <aws/core/utils/Outcome.h>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Crypto
16 {
17 
Sha256HMAC()18 Sha256HMAC::Sha256HMAC() :
19     m_hmacImpl(CreateSha256HMACImplementation())
20 {
21 }
22 
~Sha256HMAC()23 Sha256HMAC::~Sha256HMAC()
24 {
25 }
26 
Calculate(const Aws::Utils::ByteBuffer & toSign,const Aws::Utils::ByteBuffer & secret)27 HashResult Sha256HMAC::Calculate(const Aws::Utils::ByteBuffer& toSign, const Aws::Utils::ByteBuffer& secret)
28 {
29     return m_hmacImpl->Calculate(toSign, secret);
30 }
31 
32 } // namespace Crypto
33 } // namespace Utils
34 } // namespace Aws