monotone

monotone Mtn Source Tree

Root/hmac.hh

1#ifndef __HMAC_HH__
2#define __HMAC_HH__
3
4#include <string>
5
6#include "botan/botan.h"
7#include "vocab.hh"
8#include "constants.hh"
9#include "string_queue.hh"
10
11struct chained_hmac
12{
13 public:
14 chained_hmac(netsync_session_key const & session_key);
15 void set_key(netsync_session_key const & session_key);
16 std::string process(std::string const & str, size_t pos = 0,
17 size_t n = std::string::npos);
18 std::string process(string_queue const & str, size_t pos = 0,
19 size_t n = std::string::npos);
20
21 size_t const hmac_length;
22
23 private:
24 Botan::SymmetricKey key;
25 std::string chain_val;
26};
27
28
29
30
31#endif // __HMAC_HH__
32

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status