Coverage Report

Created: 2021-02-21 07:20

/src/botan/build/include/botan/internal/prf_x942.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
* X9.42 PRF
3
* (C) 1999-2007 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#ifndef BOTAN_ANSI_X942_PRF_H_
9
#define BOTAN_ANSI_X942_PRF_H_
10
11
#include <botan/kdf.h>
12
#include <botan/asn1_obj.h>
13
14
namespace Botan {
15
16
/**
17
* PRF from ANSI X9.42
18
*/
19
class X942_PRF final : public KDF
20
   {
21
   public:
22
      std::string name() const override;
23
24
0
      KDF* clone() const override { return new X942_PRF(m_key_wrap_oid); }
25
26
      void kdf(uint8_t key[], size_t key_len,
27
               const uint8_t secret[], size_t secret_len,
28
               const uint8_t salt[], size_t salt_len,
29
               const uint8_t label[], size_t label_len) const override;
30
31
0
      explicit X942_PRF(const std::string& oid) : m_key_wrap_oid(OID::from_string(oid)) {}
32
33
0
      explicit X942_PRF(const OID& oid) : m_key_wrap_oid(oid) {}
34
   private:
35
      OID m_key_wrap_oid;
36
   };
37
38
}
39
40
#endif