22 #ifndef NDN_SECURITY_KEY_PARAMS_HPP 23 #define NDN_SECURITY_KEY_PARAMS_HPP 25 #include "../common.hpp" 38 class Error :
public std::runtime_error
43 :
std::runtime_error(what)
83 checkKeySize(uint32_t size);
101 checkKeySize(uint32_t size);
109 template<
typename KeyParamsInfo>
123 , m_size(params.m_size)
131 BOOST_THROW_EXCEPTION(
KeyParams::Error(
"Incorrect key parameters (incompatible key type)"));
142 setKeySize(uint32_t size)
144 m_size = KeyParamsInfo::checkKeySize(size);
148 getDefaultKeySize()
const 150 return KeyParamsInfo::getDefaultSize();
176 checkKeySize(uint32_t size);
184 template<
typename KeyParamsInfo>
198 , m_size(params.m_size)
205 BOOST_THROW_EXCEPTION(
KeyParams::Error(
"Incorrect key parameters (incompatible key type)"));
216 setKeySize(uint32_t size)
218 m_size = KeyParamsInfo::checkKeySize(size);
222 getDefaultKeySize()
const 224 return KeyParamsInfo::getDefaultSize();
236 #endif // NDN_SECURITY_KEY_PARAMS_HPP SimplePublicKeyParams(const SimplePublicKeyParams ¶ms)
Copyright (c) 2011-2015 Regents of the University of California.
SimpleSymmetricKeyParams is a template for symmetric keys with only one parameter: size...
SimplePublicKeyParams< RsaKeyParamsInfo > RsaKeyParams
RsaKeyParams carries parameters for RSA key.
AesKeyParamsInfo is used to initialize a SimpleSymmetricKeyParams template for AES key...
Error(const std::string &what)
SimplePublicKeyParams(uint32_t size=KeyParamsInfo::getDefaultSize())
KeyType getKeyType() const
KeyParams(KeyType keyType)
uint32_t getKeySize() const
SimpleSymmetricKeyParams(uint32_t size=KeyParamsInfo::getDefaultSize())
uint32_t getKeySize() const
RsaKeyParamInfo is used to initialize a SimplePublicKeyParams template for RSA key.
SimpleSymmetricKeyParams(const KeyParams ¶ms)
SimpleSymmetricKeyParams(const SimpleSymmetricKeyParams ¶ms)
SimpleSymmetricKeyParams< AesKeyParamsInfo > AesKeyParams
SimplePublicKeyParams< EcdsaKeyParamsInfo > EcdsaKeyParams
EcdsaKeyParams carries parameters for ECDSA key.
Base class of key parameters.
EcdsaKeyParamInfo is used to initialize a SimplePublicKeyParams template for ECDSA key...
SimplePublicKeyParams(const KeyParams ¶ms)
SimplePublicKeyParams is a template for public keys with only one parameter: size.