Botan 3.7.1
Crypto and TLS for C&
kdf1_iso18033.h
Go to the documentation of this file.
1/*
2* KDF1 from ISO 18033-2
3* (C) 2016 Philipp Weber
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#ifndef BOTAN_KDF1_18033_H_
9#define BOTAN_KDF1_18033_H_
10
11#include <botan/hash.h>
12#include <botan/kdf.h>
13
14namespace Botan {
15
16/**
17* KDF1, from ISO 18033-2
18*/
19class KDF1_18033 final : public KDF {
20 public:
21 std::string name() const override;
22
23 std::unique_ptr<KDF> new_object() const override;
24
25 /**
26 * @param hash function to use
27 */
28 explicit KDF1_18033(std::unique_ptr<HashFunction> hash) : m_hash(std::move(hash)) {}
29
30 private:
31 void perform_kdf(std::span<uint8_t> key,
32 std::span<const uint8_t> secret,
33 std::span<const uint8_t> salt,
34 std::span<const uint8_t> label) const override;
35
36 private:
37 std::unique_ptr<HashFunction> m_hash;
38};
39
40} // namespace Botan
41
42#endif
std::unique_ptr< KDF > new_object() const override
std::string name() const override
KDF1_18033(std::unique_ptr< HashFunction > hash)
int(* final)(unsigned char *, CTX *)