22 #ifndef NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP 23 #define NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP 41 class Error :
public std::runtime_error
44 using std::runtime_error::runtime_error;
77 loadPkcs1(
const uint8_t* buf,
size_t size);
102 loadPkcs8(
const uint8_t* buf,
size_t size,
const char* pw,
size_t pwLen);
118 loadPkcs8(std::istream& is,
const char* pw,
size_t pwLen);
135 loadPkcs8Base64(
const uint8_t* buf,
size_t size,
const char* pw,
size_t pwLen);
179 savePkcs8(std::ostream& os,
const char* pw,
size_t pwLen)
const;
217 decrypt(
const uint8_t* cipherText,
size_t cipherLen)
const;
235 toPkcs8(
const char* pw,
size_t pwLen)
const;
241 rsaDecrypt(
const uint8_t* cipherText,
size_t cipherLen)
const;
246 static unique_ptr<PrivateKey>
247 generateRsaKey(uint32_t keySize);
249 static unique_ptr<PrivateKey>
250 generateEcKey(uint32_t keySize);
254 const unique_ptr<Impl> m_impl;
265 unique_ptr<PrivateKey>
272 #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