Botan
3.7.1
Crypto and TLS for C&
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
c
d
f
i
m
n
r
s
t
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
f
h
i
m
n
o
p
r
s
t
u
v
w
Enumerations
b
c
d
e
k
m
n
o
p
s
t
x
Enumerator
_
a
b
c
d
e
f
h
k
l
m
n
p
q
r
s
t
u
w
x
Related Symbols
b
c
d
e
f
k
o
p
s
t
x
Files
File List
File Members
All
_
a
b
c
d
e
f
i
k
m
n
o
p
q
s
t
u
w
x
y
z
Functions
b
c
Variables
Typedefs
b
c
e
p
t
Enumerations
Enumerator
b
c
d
e
k
n
Macros
_
a
b
c
f
m
n
q
s
t
w
src
lib
asn1
oids.h
Go to the documentation of this file.
1
/*
2
* OID Registry
3
* (C) 1999-2007 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#ifndef BOTAN_OIDS_H_
9
#define BOTAN_OIDS_H_
10
11
#include <botan/asn1_obj.h>
12
13
BOTAN_DEPRECATED_HEADER
(
"oids.h"
)
14
15
namespace
Botan
::OIDS {
16
17
/**
18
* Register an OID to string mapping.
19
* @param oid the oid to register
20
* @param name the name to be associated with the oid
21
*/
22
BOTAN_DEPRECATED
(
"Use OID::register_oid"
) inline
void
add_oid(const
OID
& oid, std::string_view
name
) {
23
OID::register_oid(oid,
name
);
24
}
22
BOTAN_DEPRECATED
(
"Use OID::register_oid"
) inline
void
add_oid(const
OID
& oid, std::string_view
name
) {
…
}
25
26
BOTAN_DEPRECATED
(
"Use OID::register_oid"
)
BOTAN_UNSTABLE_API
void
add_oid2str(const
OID
& oid, std::string_view
name
);
27
28
BOTAN_DEPRECATED
("Use
OID
::register_oid")
BOTAN_UNSTABLE_API
void
add_str2oid(const
OID
& oid, std::string_view
name
);
29
30
BOTAN_DEPRECATED
("Use
OID
::register_oid") inline
void
add_oidstr(const
char
* oidstr, const
char
*
name
) {
31
OID::register_oid(
OID
(oidstr),
name
);
32
}
30
BOTAN_DEPRECATED
("Use
OID
::register_oid") inline
void
add_oidstr(const
char
* oidstr, const
char
*
name
) {
…
}
33
34
/**
35
* Resolve an OID
36
* @param oid the OID to look up
37
* @return name associated with this OID, or an empty string
38
*/
39
BOTAN_DEPRECATED
(
"Use OID::human_name_or_empty"
) inline std::
string
oid2str_or_empty(const
OID
& oid) {
40
return
oid.human_name_or_empty();
41
}
39
BOTAN_DEPRECATED
(
"Use OID::human_name_or_empty"
) inline std::
string
oid2str_or_empty(const
OID
& oid) {
…
}
42
43
/**
44
* Find the OID to a name. The lookup will be performed in the
45
* general OID section of the configuration.
46
* @param name the name to resolve
47
* @return OID associated with the specified name
48
*/
49
BOTAN_DEPRECATED
(
"Use OID::from_name"
) inline
OID
str2oid_or_empty(std::string_view
name
) {
50
return
OID::from_name(
name
).value_or(
OID
());
51
}
49
BOTAN_DEPRECATED
(
"Use OID::from_name"
) inline
OID
str2oid_or_empty(std::string_view
name
) {
…
}
52
53
BOTAN_DEPRECATED
(
"Use OID::human_name_or_empty"
) inline std::
string
oid2str_or_throw(const
OID
& oid) {
54
std::string s = oid.
human_name_or_empty
();
55
if
(s.empty()) {
56
throw Lookup_Error(
"No name associated with OID "
+ oid.to_string());
57
}
58
return
s;
59
}
53
BOTAN_DEPRECATED
(
"Use OID::human_name_or_empty"
) inline std::
string
oid2str_or_throw(const
OID
& oid) {
…
}
60
61
BOTAN_DEPRECATED
(
"Use OID::human_name_or_empty"
) inline std::
string
lookup(const
OID
& oid) {
62
return
oid.human_name_or_empty();
63
}
61
BOTAN_DEPRECATED
(
"Use OID::human_name_or_empty"
) inline std::
string
lookup(const
OID
& oid) {
…
}
64
65
BOTAN_DEPRECATED
(
"Use OID::from_name"
) inline
OID
lookup(std::string_view
name
) {
66
return
OID::from_name(
name
).value_or(
OID
());
67
}
65
BOTAN_DEPRECATED
(
"Use OID::from_name"
) inline
OID
lookup(std::string_view
name
) {
…
}
68
69
}
// namespace Botan::OIDS
15
namespace
Botan
::OIDS {
…
}
70
71
#endif
BOTAN_DEPRECATED_HEADER
#define BOTAN_DEPRECATED_HEADER(hdr)
Definition
api.h:80
BOTAN_UNSTABLE_API
#define BOTAN_UNSTABLE_API
Definition
api.h:32
BOTAN_DEPRECATED
#define BOTAN_DEPRECATED(msg)
Definition
api.h:59
Botan::OID
Definition
asn1_obj.h:216
Botan::OID::human_name_or_empty
std::string human_name_or_empty() const
Definition
asn1_oid.cpp:147
name
std::string name
Definition
commoncrypto_hash.cpp:24
Botan
Definition
alg_id.cpp:13
Generated by
1.12.0