Kea 2.5.6
crypto_hash.h
Go to the documentation of this file.
1// Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#include <util/buffer.h>
8
9#include <boost/noncopyable.hpp>
10
12
13#ifndef ISC_CRYPTO_HASH_H
14#define ISC_CRYPTO_HASH_H
15
16namespace isc {
17namespace cryptolink {
18
20class HashImpl;
21
27class Hash : private boost::noncopyable {
28private:
37 Hash(const HashAlgorithm hash_algorithm);
38
40
41public:
43 ~Hash();
44
49
53 size_t getOutputLength() const;
54
62 void update(const void* data, const size_t len);
63
76 void final(isc::util::OutputBuffer& result, size_t len);
77
92 void final(void* result, size_t len);
93
106 std::vector<uint8_t> final(size_t len);
107
108private:
109 HashImpl* impl_;
110};
111
131void digest(const void* data,
132 const size_t data_len,
133 const HashAlgorithm hash_algorithm,
135 size_t len = 0);
136
138void deleteHash(Hash* hash);
139
140} // namespace cryptolink
141} // namespace isc
142
143#endif // ISC_CRYPTO_HASH_H
144
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
Definition: buffer.h:294
Defines the logger used by the top-level component of kea-lfc.