8 #ifndef BOTAN_PKCS8_H__
9 #define BOTAN_PKCS8_H__
11 #include <botan/x509_key.h>
35 BOTAN_DLL SecureVector<byte>
BER_encode(
const Private_Key& key);
42 BOTAN_DLL std::string
PEM_encode(
const Private_Key& key);
54 BOTAN_DLL SecureVector<byte>
BER_encode(
const Private_Key& key,
55 RandomNumberGenerator&
rng,
56 const std::string& pass,
57 const std::string& pbe_algo =
"");
70 BOTAN_DLL std::string
PEM_encode(
const Private_Key& key,
71 RandomNumberGenerator&
rng,
72 const std::string& pass,
73 const std::string& pbe_algo =
"");
84 BOTAN_DEPRECATED(
"Use PEM_encode or BER_encode")
108 BOTAN_DEPRECATED(
"Use PEM_encode or BER_encode")
112 const
std::
string& pass,
113 const
std::
string& pbe_algo = "",
142 const std::string& pass =
"");
164 const std::string& pass =
"");
SecureVector< byte > BER_encode(const Private_Key &key)
std::string PEM_encode(const Private_Key &key)
RandomNumberGenerator * rng
void encode(const Private_Key &key, Pipe &pipe, X509_Encoding encoding=PEM)
Private_Key * copy_key(const Private_Key &key, RandomNumberGenerator &rng)
void encrypt_key(const Private_Key &key, Pipe &pipe, RandomNumberGenerator &rng, const std::string &pass, const std::string &pbe_algo="", X509_Encoding encoding=PEM)
Private_Key * load_key(DataSource &source, RandomNumberGenerator &rng, const User_Interface &ui)
PKCS8_Exception(const std::string &error)