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
math
pcurves
pcurves_id.h
Go to the documentation of this file.
1
/*
2
* (C) 2024 Jack Lloyd
3
*
4
* Botan is released under the Simplified BSD License (see license.txt)
5
*/
6
7
#ifndef BOTAN_PCURVES_ID_H_
8
#define BOTAN_PCURVES_ID_H_
9
10
#include <botan/secmem.h>
11
#include <botan/types.h>
12
#include <optional>
13
#include <string>
14
#include <string_view>
15
16
namespace
Botan
{
17
18
#if defined(BOTAN_HAS_ASN1)
19
class
OID;
20
#endif
21
22
}
// namespace Botan
23
24
namespace
Botan::PCurve
{
25
26
/// Identifier for a named prime order curve
27
class
BOTAN_TEST_API
PrimeOrderCurveId
final
{
28
public
:
29
enum class
Code
: uint8_t {
30
/// secp192r1 aka P-192
31
secp192r1,
32
/// secp224r1 aka P-224
33
secp224r1,
34
/// secp256r1 aka P-256
35
secp256r1,
36
/// secp384r1 aka P-384
37
secp384r1,
38
/// secp521r1 aka P-521
39
secp521r1,
40
/// secp256k1
41
secp256k1,
42
/// brainpool256r1
43
brainpool256r1,
44
brainpool384r1,
45
brainpool512r1,
46
frp256v1,
47
sm2p256v1,
48
numsp512d1,
49
};
29
enum class
Code
: uint8_t {
{
…
};
50
51
using
enum Code;
52
53
Code
code
()
const
{
return
m_code; }
54
55
/// Convert the ID to it's commonly used name (inverse of from_string)
56
std::string to_string()
const
;
57
58
PrimeOrderCurveId
(
Code
id
) : m_code(id) {}
59
60
/// Map a string to a curve identifier
61
static
std::optional<PrimeOrderCurveId> from_string(std::string_view
name
);
62
63
#if defined(BOTAN_HAS_ASN1)
64
/// Map an OID to a curve identifier
65
///
66
/// Uses the internal OID table
67
static
std::optional<PrimeOrderCurveId> from_oid(
const
OID
& oid);
68
#endif
69
70
private
:
71
const
Code m_code;
72
};
27
class
BOTAN_TEST_API
PrimeOrderCurveId
final
{
…
};
73
74
}
// namespace Botan::PCurve
75
76
#endif
BOTAN_TEST_API
#define BOTAN_TEST_API
Definition
api.h:39
Botan::OID
Definition
asn1_obj.h:216
Botan::PCurve::PrimeOrderCurveId
Identifier for a named prime order curve.
Definition
pcurves_id.h:27
Botan::PCurve::PrimeOrderCurveId::code
Code code() const
Definition
pcurves_id.h:53
Botan::PCurve::PrimeOrderCurveId::Code
Code
Definition
pcurves_id.h:29
Botan::PCurve::PrimeOrderCurveId::PrimeOrderCurveId
PrimeOrderCurveId(Code id)
Definition
pcurves_id.h:58
name
std::string name
Definition
commoncrypto_hash.cpp:24
final
int(* final)(unsigned char *, CTX *)
Definition
commoncrypto_hash.cpp:29
Botan::PCurve
Definition
pcurves.cpp:15
Botan
Definition
alg_id.cpp:13
Generated by
1.12.0