22 #ifndef NDN_SECURITY_KEY_PARAMS_HPP    23 #define NDN_SECURITY_KEY_PARAMS_HPP    38   class Error : 
public std::runtime_error
    41     using std::runtime_error::runtime_error;
   116   checkKeySize(uint32_t size);
   138   checkKeySize(uint32_t size);
   148 template<
typename KeyParamsInfo>
   155                         uint32_t size = KeyParamsInfo::getDefaultSize())
   156     : 
KeyParams(KeyParamsInfo::getType(), keyId)
   170     : 
KeyParams(KeyParamsInfo::getType(), keyIdType)
   183   setKeySize(uint32_t size)
   185     m_size = KeyParamsInfo::checkKeySize(size);
   189   getDefaultKeySize()
 const   191     return KeyParamsInfo::getDefaultSize();
   223   checkKeySize(uint32_t size);
   245   checkKeySize(uint32_t size);
   255 template<
typename KeyParamsInfo>
   262                            uint32_t size = KeyParamsInfo::getDefaultSize())
   263     : 
KeyParams(KeyParamsInfo::getType(), keyId)
   277     : 
KeyParams(KeyParamsInfo::getType(), keyIdType)
   290   setKeySize(uint32_t size)
   292     m_size = KeyParamsInfo::checkKeySize(size);
   296   getDefaultKeySize()
 const   298     return KeyParamsInfo::getDefaultSize();
   313 #endif // NDN_SECURITY_KEY_PARAMS_HPP static constexpr KeyType getType()
static constexpr KeyType getType()
static constexpr KeyType getType()
SimpleSymmetricKeyParams is a template for symmetric keys with only one parameter: size...
SimpleSymmetricKeyParams(uint32_t size=KeyParamsInfo::getDefaultSize(), KeyIdType keyIdType=KeyIdType::RANDOM)
Create key parameters with auto-generated key id. 
SimpleSymmetricKeyParams(const name::Component &keyId, uint32_t size=KeyParamsInfo::getDefaultSize())
Create key parameters with user-specified key id. 
KeyIdType
The type of KeyId component in a key name. 
void setKeyId(const name::Component &keyId)
static constexpr KeyType getType()
RSA key, supports sign/verify and encrypt/decrypt operations. 
SimpleSymmetricKeyParams< detail::HmacKeyParamsInfo > HmacKeyParams
HmacKeyParams carries parameters for HMAC key. 
RsaKeyParamInfo is used to instantiate SimplePublicKeyParams for RSA keys. 
HMAC key, supports sign/verify operations. 
SimplePublicKeyParams< detail::RsaKeyParamsInfo > RsaKeyParams
RsaKeyParams carries parameters for RSA key. 
KeyType
The type of a cryptographic key. 
SimplePublicKeyParams< detail::EcKeyParamsInfo > EcKeyParams
EcKeyParams carries parameters for EC key. 
HmacKeyParamsInfo is used to instantiate SimpleSymmetricKeyParams for HMAC keys. 
SimplePublicKeyParams(const name::Component &keyId, uint32_t size=KeyParamsInfo::getDefaultSize())
Create key parameters with user-specified key id. 
Elliptic Curve key (e.g. for ECDSA), supports sign/verify operations. 
uint32_t getKeySize() const
KeyType getKeyType() const
SimpleSymmetricKeyParams< detail::AesKeyParamsInfo > AesKeyParams
AesKeyParams carries parameters for AES key. 
KeyParams(KeyType keyType, KeyIdType keyIdType)
Constructor. 
EcKeyParamInfo is used to instantiate SimplePublicKeyParams for elliptic curve keys. 
SimplePublicKeyParams(uint32_t size=KeyParamsInfo::getDefaultSize(), KeyIdType keyIdType=KeyIdType::RANDOM)
Create key parameters with auto-generated key id. 
Represents a name component. 
Use a 64-bit random number as key id. 
Base class for key parameters. 
uint32_t getKeySize() const
SimplePublicKeyParams is a template for public keys with only one parameter: size. 
AES key, supports encrypt/decrypt operations. 
KeyIdType getKeyIdType() const
AesKeyParamsInfo is used to instantiate SimpleSymmetricKeyParams for AES keys. 
const name::Component & getKeyId() const