|
Botan 3.14.1
Crypto and TLS for C&
|
#include <telephone_number.h>
Public Member Functions | |
| bool | is_wildcard () const |
| size_t | length () const |
| std::optional< uint64_t > | numeric_value () const |
| auto | operator<=> (const TelephoneNumber &) const =default |
| const std::string & | to_string () const |
Static Public Member Functions | |
| static std::optional< TelephoneNumber > | from_string (std::string_view tn) |
A telephone number as used in RFC 8226 STIR certificates
TelephoneNumber ::= IA5String (SIZE (1..15)) (FROM ("0123456789#*"))
This is the dialed form rather than E.164: '*' and '#' may appear, and leading zeros are significant, so "0123" and "123" are distinct numbers.
Definition at line 25 of file telephone_number.h.
|
static |
Parse a telephone number
tn is 1 to 15 characters from "0123456789#*" Definition at line 13 of file telephone_number.cpp.
Referenced by Botan::Cert_Extension::TNAuthList::Entry::decode_from(), and Botan::TelephoneNumberRange::last().
| bool Botan::TelephoneNumber::is_wildcard | ( | ) | const |
Definition at line 21 of file telephone_number.cpp.
Referenced by numeric_value().
|
inline |
Definition at line 46 of file telephone_number.h.
Referenced by Botan::TelephoneNumberRange::contains(), Botan::TelephoneNumberRange::contains(), and Botan::Cert_Extension::TNAuthList::encompasses().
| std::optional< uint64_t > Botan::TelephoneNumber::numeric_value | ( | ) | const |
Definition at line 25 of file telephone_number.cpp.
References is_wildcard().
Referenced by Botan::TelephoneNumberRange::contains(), Botan::TelephoneNumberRange::contains(), Botan::Cert_Extension::TNAuthList::encompasses(), and Botan::TelephoneNumberRange::last().
|
default |
Numbers are ordered by their string form
|
inline |
Definition at line 36 of file telephone_number.h.