133 #ifndef OPENTXS_CORE_CRYPTO_OTASYMMETRICKEY_HPP
134 #define OPENTXS_CORE_CRYPTO_OTASYMMETRICKEY_HPP
136 #include "../util/Timer.hpp"
143 class OTAsymmetricKey;
147 class OTSignatureMetadata;
172 #define OT_KEY_TIMER 30
182 #endif // OT_KEY_TIMER
373 const OTString* pstrReason =
nullptr,
386 const OTString& strCert,
bool bEscaped =
true,
387 const OTString* pstrReason =
nullptr,
388 const OTPassword* pImportPassword =
nullptr) = 0;
394 const OTString& strCert,
bool bEscaped =
true,
395 const OTString* pstrReason =
nullptr,
396 const OTPassword* pImportPassword =
nullptr) = 0;
401 const OTString* pstrReason =
nullptr,
405 const OTPassword* pImportPassword =
nullptr)
const = 0;
408 const OTPassword* pImportPassword =
nullptr)
const = 0;
410 bool bImporting)
const = 0;
451 #endif // OPENTXS_CORE_CRYPTO_OTASYMMETRICKEY_HPP
virtual OTAsymmetricKey * ClonePubKey() const
static EXPORT OTAsymmetricKey * KeyFactory()
virtual bool ReEncryptPrivateKey(const OTPassword &theExportPassword, bool bImporting) const =0
std::list< OTAsymmetricKey * > listOfAsymmetricKeys
virtual bool LoadPublicKeyFromCertString(const OTString &strCert, bool bEscaped=true, const OTString *pstrReason=nullptr, const OTPassword *pImportPassword=nullptr)=0
static OTCaller * s_pCaller
void ReleaseKeyLowLevel()
OTASCIIArmor * m_p_ascKey
EXPORT OT_OPENSSL_CALLBACK souped_up_pass_cb
bool LoadPublicKey(const OTString &strFoldername, const OTString &strFilename)
int32_t OT_OPENSSL_CALLBACK(char *buf, int32_t size, int32_t rwflag, void *userdata)
OTSignatureMetadata * m_pMetadata
virtual bool LoadPrivateKeyFromCertString(const OTString &strCert, bool bEscaped=true, const OTString *pstrReason=nullptr, const OTPassword *pImportPassword=nullptr)=0
EXPORT OT_OPENSSL_CALLBACK default_pass_cb
bool LoadPublicKeyFromCertFile(const OTString &strFoldername, const OTString &strFilename, const OTString *pstrReason=nullptr, const OTPassword *pImportPassword=nullptr)
virtual bool SaveCertToString(OTString &strOutput, const OTString *pstrReason=nullptr, const OTPassword *pImportPassword=nullptr) const =0
static OTCaller * GetPasswordCaller()
bool SetPrivateKey(const OTString &strKey, bool bEscaped=false)
static OT_OPENSSL_CALLBACK * s_pwCallback
static bool SetPasswordCaller(OTCaller &theCaller)
EXPORT bool SetPublicKey(const OTASCIIArmor &strKey)
virtual bool LoadPublicKeyFromPGPKey(const OTASCIIArmor &strKey)=0
bool GetPrivateKey(OTString &strKey, bool bEscaped=true) const
EXPORT bool GetPublicKey(OTASCIIArmor &strKey) const
virtual bool SavePrivateKeyToString(OTString &strOutput, const OTString *pstrReason=nullptr, const OTPassword *pImportPassword=nullptr) const =0
virtual bool CalculateID(OTIdentifier &theOutput) const
static void SetPasswordCallback(OT_OPENSSL_CALLBACK *pCallback)
void Release_AsymmetricKey()
virtual void ReleaseKeyLowLevel_Hook() const =0
static bool IsPasswordCallbackSet()
bool LoadPrivateKey(const OTString &strFoldername, const OTString &strFilename, const OTString *pstrReason=nullptr, const OTPassword *pImportPassword=nullptr)
static EXPORT OT_OPENSSL_CALLBACK * GetPasswordCallback()
virtual EXPORT ~OTAsymmetricKey()
EXPORT bool OT_API_Set_PasswordCallback(OTCaller &theCaller)