NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
private-key.cpp File Reference
#include "private-key.hpp"
#include "buffer-source.hpp"
#include "stream-source.hpp"
#include "base64-encode.hpp"
#include "base64-decode.hpp"
#include "stream-sink.hpp"
#include "../../encoding/buffer-stream.hpp"
#include "../detail/openssl-helper.hpp"
#include "../key-params.hpp"
#include <string.h>
Include dependency graph for private-key.cpp:

Go to the source code of this file.

Classes

class  ndn::security::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)
 Copyright (c) 2013-2016 Regents of the University of California. More...
 

Functions

static int ndn::security::transform::passwordCallback (char *buf, int size, int rwflag, void *u)
 
static unique_ptr< PrivateKey > ndn::security::transform::generateRsaKey (uint32_t keySize)
 
static unique_ptr< PrivateKey > ndn::security::transform::generateEcKey (uint32_t keySize)
 
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) \
BOOST_THROW_EXCEPTION(Error("Private key has not been loaded yet")); \
} while (false)

Copyright (c) 2013-2016 Regents of the University of California.

This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).

ndn-cxx library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received copies of the GNU General Public License and GNU Lesser General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see http://www.gnu.org/licenses/.

See AUTHORS.md for complete list of ndn-cxx authors and contributors.

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

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