ndn::SimpleSymmetricKeyParams< KeyParamsInfo > Class Template Reference

SimpleSymmetricKeyParams is a template for symmetric keys with only one parameter: size. More...

#include <ndn-cxx/security/key-params.hpp>

+ Inheritance diagram for ndn::SimpleSymmetricKeyParams< KeyParamsInfo >:
+ Collaboration diagram for ndn::SimpleSymmetricKeyParams< KeyParamsInfo >:

Public Member Functions

 SimpleSymmetricKeyParams (const name::Component &keyId, uint32_t size=KeyParamsInfo::getDefaultSize())
 Create key parameters with user-specified key id. More...
 
 SimpleSymmetricKeyParams (uint32_t size=KeyParamsInfo::getDefaultSize(), KeyIdType keyIdType=KeyIdType::RANDOM)
 Create key parameters with auto-generated key id. More...
 
const name::ComponentgetKeyId () const
 
KeyIdType getKeyIdType () const
 
uint32_t getKeySize () const
 
KeyType getKeyType () const
 
void setKeyId (const name::Component &keyId)
 

Detailed Description

template<typename KeyParamsInfo>
class ndn::SimpleSymmetricKeyParams< KeyParamsInfo >

SimpleSymmetricKeyParams is a template for symmetric keys with only one parameter: size.

Definition at line 256 of file key-params.hpp.

Constructor & Destructor Documentation

◆ SimpleSymmetricKeyParams() [1/2]

template<typename KeyParamsInfo >
ndn::SimpleSymmetricKeyParams< KeyParamsInfo >::SimpleSymmetricKeyParams ( const name::Component keyId,
uint32_t  size = KeyParamsInfo::getDefaultSize() 
)
inlineexplicit

Create key parameters with user-specified key id.

Definition at line 261 of file key-params.hpp.

◆ SimpleSymmetricKeyParams() [2/2]

template<typename KeyParamsInfo >
ndn::SimpleSymmetricKeyParams< KeyParamsInfo >::SimpleSymmetricKeyParams ( uint32_t  size = KeyParamsInfo::getDefaultSize(),
KeyIdType  keyIdType = KeyIdType::RANDOM 
)
inlineexplicit

Create key parameters with auto-generated key id.

This method is used only if user does not want to maintain the uniqueness of key name. By default, an 8-byte random number will be used as key id.

Definition at line 275 of file key-params.hpp.

Member Function Documentation

◆ getKeyId()

const name::Component& ndn::KeyParams::getKeyId ( ) const
inlineinherited

Definition at line 60 of file key-params.hpp.

◆ getKeyIdType()

KeyIdType ndn::KeyParams::getKeyIdType ( ) const
inlineinherited

Definition at line 54 of file key-params.hpp.

◆ getKeySize()

template<typename KeyParamsInfo >
uint32_t ndn::SimpleSymmetricKeyParams< KeyParamsInfo >::getKeySize ( ) const
inline

Definition at line 283 of file key-params.hpp.

◆ getKeyType()

KeyType ndn::KeyParams::getKeyType ( ) const
inlineinherited

Definition at line 48 of file key-params.hpp.

◆ setKeyId()

void ndn::KeyParams::setKeyId ( const name::Component keyId)
inlineinherited

Definition at line 66 of file key-params.hpp.