Botan 2.19.5 Crypto and TLS for C&

par_hash.h
Go to the documentation of this file.
1/*
2* Parallel Hash
3* (C) 1999-2007 Jack Lloyd
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#ifndef BOTAN_PARALLEL_HASH_H_
9#define BOTAN_PARALLEL_HASH_H_
10
11#include <botan/hash.h>
12#include <vector>
13
14 BOTAN_FUTURE_INTERNAL_HEADER(par_hash.h)
15
16namespace Botan {
17
18/**
19* Parallel Hashes
20*/
21 class BOTAN_PUBLIC_API(2,0) Parallel final : public HashFunction
22 {
23 public:
24 void clear() override;
25 std::string name() const override;
26 HashFunction* clone() const override;
27 std::unique_ptr<HashFunction> copy_state() const override;
28
29 size_t output_length() const override;
30
31 /**
32 * @param hashes a set of hashes to compute in parallel
33 * Takes ownership of all pointers
34 */
35 explicit Parallel(std::vector<std::unique_ptr<HashFunction>>& hashes);
36
37 Parallel(const Parallel&) = delete;
38 Parallel& operator=(const Parallel&) = delete;
39 private:
40 Parallel() = delete;
41
42 void add_data(const uint8_t[], size_t) override;
43 void final_result(uint8_t[]) override;
44
45 std::vector<std::unique_ptr<HashFunction>> m_hashes;
46 };
47
48}
49
50#endif
Botan::Buffered_Computation::output_length
virtual size_t output_length() const =0
Botan::HashFunction
Definition: hash.h:21
Botan::HashFunction::clone
virtual HashFunction * clone() const =0
Botan::HashFunction::copy_state
virtual std::unique_ptr< HashFunction > copy_state() const =0
Botan::HashFunction::name
virtual std::string name() const =0
Botan::HashFunction::clear
virtual void clear()=0
Botan::Parallel
Definition: par_hash.h:22
Botan::Parallel::Parallel
Parallel(const Parallel &)=delete
Botan::Parallel::operator=
Parallel & operator=(const Parallel &)=delete
final
int(* final)(unsigned char *, CTX *)
Definition: commoncrypto_hash.cpp:29
BOTAN_PUBLIC_API
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
BOTAN_FUTURE_INTERNAL_HEADER
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)
Definition: compiler.h:136
Botan
Definition: alg_id.cpp:13