10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
RSAPublicKeyParameters.h
1
#ifndef TENDUKE_CRYPTO_RSAPUBLICKEYPARAMETERS_H
2
#define TENDUKE_CRYPTO_RSAPUBLICKEYPARAMETERS_H
3
4
#include "../../utl/BinaryData.h"
5
6
#include <cstddef>
7
8
namespace
tenduke
{
namespace
crypto
{
9
11
constexpr
std::size_t
MIN_RSA_MODULUS_BITS
= 2048;
13
constexpr
std::size_t
MAX_RSA_MODULUS_BITS
= 16384;
14
20
struct
RSAPublicKeyParameters
21
{
23
const
unsigned
char
*
modulus
;
25
std::size_t
modulusLength
;
27
std::size_t
modulusBits
;
29
const
unsigned
char
*
exponent
;
31
std::size_t
exponentLength
;
32
};
33
44
RSAPublicKeyParameters
checkRSAPublicKeyParameters
(
45
const
tenduke::utl::BinaryData
&modulus,
46
const
tenduke::utl::BinaryData
&exponent
47
);
48
49
}}
50
51
#endif
//TENDUKE_CRYPTO_RSAPUBLICKEYPARAMETERS_H
tenduke::utl::BinaryData
A holder of binary data.
Definition
BinaryData.h:14
tenduke::crypto
Cryptography services.
Definition
AbstractCiphers.h:18
tenduke::crypto::MIN_RSA_MODULUS_BITS
constexpr std::size_t MIN_RSA_MODULUS_BITS
Smallest accepted RSA modulus, in bits.
Definition
RSAPublicKeyParameters.h:11
tenduke::crypto::checkRSAPublicKeyParameters
RSAPublicKeyParameters checkRSAPublicKeyParameters(const tenduke::utl::BinaryData &modulus, const tenduke::utl::BinaryData &exponent)
Checks that RSA public key parameters are safe to use for verifying signatures.
Definition
RSAPublicKeyParameters.cpp:35
tenduke::crypto::MAX_RSA_MODULUS_BITS
constexpr std::size_t MAX_RSA_MODULUS_BITS
Largest accepted RSA modulus, in bits (same as OpenSSL's OPENSSL_RSA_MAX_MODULUS_BITS).
Definition
RSAPublicKeyParameters.h:13
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
tenduke::crypto::RSAPublicKeyParameters
RSA public key parameters that have passed checkRSAPublicKeyParameters().
Definition
RSAPublicKeyParameters.h:21
tenduke::crypto::RSAPublicKeyParameters::modulus
const unsigned char * modulus
Modulus (n).
Definition
RSAPublicKeyParameters.h:23
tenduke::crypto::RSAPublicKeyParameters::modulusLength
std::size_t modulusLength
Length of the modulus in bytes.
Definition
RSAPublicKeyParameters.h:25
tenduke::crypto::RSAPublicKeyParameters::exponentLength
std::size_t exponentLength
Length of the public exponent in bytes.
Definition
RSAPublicKeyParameters.h:31
tenduke::crypto::RSAPublicKeyParameters::modulusBits
std::size_t modulusBits
Length of the modulus in bits.
Definition
RSAPublicKeyParameters.h:27
tenduke::crypto::RSAPublicKeyParameters::exponent
const unsigned char * exponent
Public exponent (e).
Definition
RSAPublicKeyParameters.h:29
core
core
src
crypto
asymmetric
RSAPublicKeyParameters.h
Generated by
1.17.0