~ubuntu-branches/debian/sid/botan/sid

« back to all changes in this revision

Viewing changes to checks/common.h

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2018-03-01 22:23:25 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20180301222325-7p7vc45gu3hta34d
Tags: 2.4.0-2
* Don't remove .doctrees from the manual if it doesn't exist.
* Don't specify parallel to debhelper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// common code for the validation and benchmark code
2
 
 
3
 
#ifndef BOTAN_CHECK_COMMON_H__
4
 
#define BOTAN_CHECK_COMMON_H__
5
 
 
6
 
#include <vector>
7
 
#include <string>
8
 
 
9
 
struct algorithm
10
 
   {
11
 
      algorithm(const char* t, const char* n,
12
 
                u32bit k = 0, u32bit i = 0) :
13
 
         type(t), name(n), filtername(n), keylen(k), ivlen(i) {}
14
 
      algorithm(const char* t, const char* n,
15
 
                const char* f, u32bit k = 0, u32bit i = 0) :
16
 
         type(t), name(n), filtername(f), keylen(k), ivlen(i) {}
17
 
      std::string type, name, filtername;
18
 
      u32bit keylen, ivlen, weight;
19
 
   };
20
 
 
21
 
std::vector<algorithm> get_algos();
22
 
 
23
 
void strip_comments(std::string& line);
24
 
void strip_newlines(std::string& line);
25
 
void strip(std::string& line);
26
 
std::vector<std::string> parse(const std::string& line);
27
 
 
28
 
std::string hex_encode(const byte in[], u32bit len);
29
 
Botan::SecureVector<byte> decode_hex(const std::string&);
30
 
 
31
 
Botan::u64bit get_clock();
32
 
Botan::u64bit get_ticks();
33
 
 
34
 
#endif