NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
private-key.cpp File Reference
Include dependency graph for private-key.cpp:

Go to the source code of this file.

Classes

class  transform::PrivateKey::Impl
 

Namespaces

 ndn
 Copyright (c) 2011-2015 Regents of the University of California.
 
 ndn::security
 
 ndn::security::transform
 

Macros

#define ENSURE_PRIVATE_KEY_LOADED(key)
 
#define ENSURE_PRIVATE_KEY_NOT_LOADED(key)
 

Functions

static int ndn::security::transform::passwordCallbackWrapper (char *buf, int size, int rwflag, void *u)
 
unique_ptr< PrivateKey > ndn::security::transform::generatePrivateKey (const KeyParams &keyParams)
 Generate a private key according to keyParams. More...
 

Macro Definition Documentation

◆ ENSURE_PRIVATE_KEY_LOADED

#define ENSURE_PRIVATE_KEY_LOADED (   key)
Value:
do { \
if ((key) == nullptr) \
NDN_THROW(Error("Private key has not been loaded yet")); \
} while (false)

Definition at line 38 of file private-key.cpp.

Referenced by ndn::security::transform::PrivateKey::decrypt(), and ndn::security::transform::PrivateKey::derivePublicKey().

◆ ENSURE_PRIVATE_KEY_NOT_LOADED

#define ENSURE_PRIVATE_KEY_NOT_LOADED (   key)
Value:
do { \
if ((key) != nullptr) \
NDN_THROW(Error("Private key has already been loaded")); \
} while (false)

Definition at line 44 of file private-key.cpp.

Referenced by ndn::security::transform::PrivateKey::loadPkcs1(), ndn::security::transform::PrivateKey::loadPkcs8(), and ndn::security::transform::PrivateKey::loadRaw().