• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

randombit / botan / 4834822395

28 Apr 2023 09:55PM UTC coverage: 92.132% (-0.01%) from 92.146%
4834822395

push

github

77584 of 84210 relevant lines covered (92.13%)

12129586.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/lib/mac/hmac/hmac.h
1
/*
2
* HMAC
3
* (C) 1999-2007,2014 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7

8
#ifndef BOTAN_HMAC_H_
9
#define BOTAN_HMAC_H_
10

11
#include <botan/mac.h>
12
#include <botan/hash.h>
13

14
namespace Botan {
15

16
/**
17
* HMAC
18
*/
19
class HMAC final : public MessageAuthenticationCode
×
20
   {
21
   public:
22
      void clear() override;
23
      std::string name() const override;
24
      std::unique_ptr<MessageAuthenticationCode> new_object() const override;
25

26
      size_t output_length() const override;
27

28
      Key_Length_Specification key_spec() const override;
29

30
      bool has_keying_material() const override;
31

32
      /**
33
      * @param hash the hash to use for HMACing
34
      */
35
      explicit HMAC(std::unique_ptr<HashFunction> hash);
36

37
      HMAC(const HMAC&) = delete;
38
      HMAC& operator=(const HMAC&) = delete;
39
   private:
40
      void add_data(const uint8_t[], size_t) override;
41
      void final_result(uint8_t[]) override;
42
      void key_schedule(const uint8_t[], size_t) override;
43

44
      std::unique_ptr<HashFunction> m_hash;
45
      secure_vector<uint8_t> m_ikey, m_okey;
46
      size_t m_hash_output_length;
47
      size_t m_hash_block_size;
48
   };
49

50
}
51

52
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc