22 #ifndef NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP 23 #define NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP 25 #include "../security-common.hpp" 26 #include "../../encoding/buffer.hpp" 41 class Error :
public std::runtime_error
46 :
std::runtime_error(what)
81 loadPkcs1(
const uint8_t* buf,
size_t size);
106 loadPkcs8(
const uint8_t* buf,
size_t size,
const char* pw,
size_t pwLen);
122 loadPkcs8(std::istream& is,
const char* pw,
size_t pwLen);
139 loadPkcs8Base64(
const uint8_t* buf,
size_t size,
const char* pw,
size_t pwLen);
183 savePkcs8(std::ostream& os,
const char* pw,
size_t pwLen)
const;
221 decrypt(
const uint8_t* cipherText,
size_t cipherLen)
const;
239 toPkcs8(
const char* pw,
size_t pwLen)
const;
245 rsaDecrypt(
const uint8_t* cipherText,
size_t cipherLen)
const;
250 static unique_ptr<PrivateKey>
251 generateRsaKey(uint32_t keySize);
253 static unique_ptr<PrivateKey>
254 generateEcKey(uint32_t keySize);
258 const unique_ptr<Impl> m_impl;
269 unique_ptr<PrivateKey>
276 #endif // NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP
Copyright (c) 2011-2015 Regents of the University of California.
KeyType
The type of a cryptographic key.
Base class of key parameters.
shared_ptr< const Buffer > ConstBufferPtr