aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/parsing.h
blob: aedfd1cbcd9ef6c9c851f7a47834ff91c2dcea47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*************************************************
* Parser Functions Header File                   *
* (C) 1999-2007 Jack Lloyd                       *
*************************************************/

#ifndef BOTAN_PARSER_H__
#define BOTAN_PARSER_H__

#include <botan/types.h>
#include <string>
#include <vector>

namespace Botan {

/*************************************************
* String Parsing Functions                       *
*************************************************/
BOTAN_DLL std::vector<std::string> parse_algorithm_name(const std::string&);
BOTAN_DLL std::vector<std::string> split_on(const std::string&, char);
BOTAN_DLL std::vector<u32bit> parse_asn1_oid(const std::string&);
BOTAN_DLL bool x500_name_cmp(const std::string&, const std::string&);

/*************************************************
* String/Integer Conversions                     *
*************************************************/
BOTAN_DLL std::string to_string(u64bit, u32bit = 0);
BOTAN_DLL u32bit to_u32bit(const std::string&);

BOTAN_DLL u32bit timespec_to_u32bit(const std::string& timespec);

/*************************************************
* String/Network Address Conversions             *
*************************************************/
BOTAN_DLL u32bit string_to_ipv4(const std::string&);
BOTAN_DLL std::string ipv4_to_string(u32bit);

}

#endif