22 #ifndef NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP 23 #define NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP 26 #include "../../encoding/buffer.hpp" 41 class Error :
public std::runtime_error
46 :
std::runtime_error(what)
76 loadPkcs1(
const uint8_t* buf,
size_t size);
102 loadPkcs8(
const uint8_t* buf,
size_t size,
const char* pw,
size_t pwLen);
111 loadPkcs8(
const uint8_t* buf,
size_t size, PasswordCallback pwCallback =
nullptr);
119 loadPkcs8(std::istream& is,
const char* pw,
size_t pwLen);
128 loadPkcs8(std::istream& is, PasswordCallback pwCallback =
nullptr);
137 loadPkcs8Base64(
const uint8_t* buf,
size_t size,
const char* pw,
size_t pwLen);
146 loadPkcs8Base64(
const uint8_t* buf,
size_t size, PasswordCallback pwCallback =
nullptr);
164 loadPkcs8Base64(std::istream& is, PasswordCallback pwCallback =
nullptr);
182 savePkcs8(std::ostream& os,
const char* pw,
size_t pwLen)
const;
191 savePkcs8(std::ostream& os, PasswordCallback pwCallback =
nullptr)
const;
206 savePkcs8Base64(std::ostream& os, PasswordCallback pwCallback =
nullptr)
const;
220 decrypt(
const uint8_t* cipherText,
size_t cipherLen)
const;
236 toPkcs8(
const char* pw,
size_t pwLen)
const;
239 toPkcs8(PasswordCallback pwCallback =
nullptr)
const;
242 rsaDecrypt(
const uint8_t* cipherText,
size_t cipherLen)
const;
246 unique_ptr<Impl> m_impl;
257 unique_ptr<PrivateKey>
264 #endif // NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP
Copyright (c) 2011-2015 Regents of the University of California.
Base class of key parameters.
shared_ptr< const Buffer > ConstBufferPtr