AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
DigestInterface.h
Go to the documentation of this file.
1 /*
2  * Copyright 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 #ifndef ACSDK_CRYPTOINTERFACES_DIGESTINTERFACE_H_
17 #define ACSDK_CRYPTOINTERFACES_DIGESTINTERFACE_H_
18 
19 #include <string>
20 #include <vector>
21 
22 namespace alexaClientSDK {
23 namespace cryptoInterfaces {
24 
53 public:
56  typedef std::vector<unsigned char> DataBlock;
57 
59  virtual ~DigestInterface() noexcept = default;
60 
76  virtual bool process(const DataBlock& dataIn) noexcept = 0;
77 
96  virtual bool process(DataBlock::const_iterator begin, DataBlock::const_iterator end) noexcept = 0;
97 
108  virtual bool processByte(unsigned char value) noexcept = 0;
109 
120  virtual bool processUInt8(uint8_t value) noexcept = 0;
121 
138  virtual bool processUInt16(uint16_t value) noexcept = 0;
139 
156  virtual bool processUInt32(uint32_t value) noexcept = 0;
157 
174  virtual bool processUInt64(uint64_t value) noexcept = 0;
175 
192  virtual bool processString(const std::string& value) noexcept = 0;
193 
207  virtual bool finalize(DataBlock& dataOut) noexcept = 0;
208 
217  virtual bool reset() noexcept = 0;
218 };
219 
220 } // namespace cryptoInterfaces
221 } // namespace alexaClientSDK
222 
223 #endif // ACSDK_CRYPTOINTERFACES_DIGESTINTERFACE_H_
virtual bool finalize(DataBlock &dataOut) noexcept=0
Finishes digest computation and produces the result.
virtual bool processString(const std::string &value) noexcept=0
Updates digest with string value.
Definition: CapabilityConfiguration.h:190
virtual bool reset() noexcept=0
Resets the digest.
virtual ~DigestInterface() noexcept=default
Default destructor.
virtual bool processUInt32(uint32_t value) noexcept=0
Updates digest with uint32_t integer value.
virtual bool process(const DataBlock &dataIn) noexcept=0
Updates digest with a data block.
virtual bool processUInt16(uint16_t value) noexcept=0
Updates digest with uint16_t integer value.
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
const
Definition: upload.py:398
Digest computation interface.
Definition: DigestInterface.h:52
virtual bool processUInt64(uint64_t value) noexcept=0
Updates digest with uint64_t integer value.
default
Definition: upload.py:394
std::vector< unsigned char > DataBlock
Data block type. This type represents a byte array.
Definition: DigestInterface.h:56
virtual bool processByte(unsigned char value) noexcept=0
Updates digest with a byte value.
virtual bool processUInt8(uint8_t value) noexcept=0
Updates digest with uint8_t value.

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0