133 #ifndef OPENTXS_CORE_CRYPTO_OTSYMMETRICKEY_HPP
134 #define OPENTXS_CORE_CRYPTO_OTSYMMETRICKEY_HPP
136 #include "../OTPayload.hpp"
151 bool m_bHasHashCheck;
155 uint32_t m_uIterationCount;
174 const OTString* pstrDisplay =
nullptr,
175 bool bAskTwice =
false);
184 const OTString* pstrDisplay =
nullptr,
189 const OTString* pstrDisplay =
nullptr,
190 bool bBookends =
true,
195 const OTString* pstrDisplay =
nullptr,
201 const OTString* pstrDisplay =
nullptr,
202 bool bBookends =
true,
208 const OTString* pstrDisplay =
nullptr,
221 return m_bIsGenerated;
225 return m_bHasHashCheck;
235 const OTPassword& thePassphrase,
bool bCheckForHashCheck =
true)
const;
287 #endif // OPENTXS_CORE_CRYPTO_OTSYMMETRICKEY_HPP
EXPORT OTPassword * CalculateNewDerivedKeyFromPassphrase(const OTPassword &thePassphrase)
EXPORT bool SerializeFrom(OTPayload &theInput)
EXPORT bool ReGenerateHashCheck(const OTPassword &thePassphrase)
EXPORT bool GetRawKeyFromPassphrase(const OTPassword &thePassphrase, OTPassword &theRawKeyOutput, OTPassword *pDerivedKey=nullptr) const
static EXPORT bool Decrypt(const OTString &strKey, OTString &strCiphertext, OTString &strOutput, const OTString *pstrDisplay=nullptr, const OTPassword *pAlreadyHavePW=nullptr)
static EXPORT OTPassword * GetPassphraseFromUser(const OTString *pstrDisplay=nullptr, bool bAskTwice=false)
EXPORT bool GetRawKeyFromDerivedKey(const OTPassword &theDerivedKey, OTPassword &theRawKeyOutput) const
static EXPORT bool Encrypt(const OTString &strKey, const OTString &strPlaintext, OTString &strOutput, const OTString *pstrDisplay=nullptr, bool bBookends=true, const OTPassword *pAlreadyHavePW=nullptr)
EXPORT void Release_SymmetricKey()
EXPORT bool GenerateKey(const OTPassword &thePassphrase, OTPassword **ppDerivedKey=nullptr)
EXPORT bool SerializeTo(OTPayload &theOutput) const
EXPORT OTPassword * CalculateDerivedKeyFromPassphrase(const OTPassword &thePassphrase, bool bCheckForHashCheck=true) const
virtual EXPORT void Release()
EXPORT bool GenerateHashCheck(const OTPassword &thePassphrase)
EXPORT bool ChangePassphrase(const OTPassword &oldPassphrase, const OTPassword &newPassphrase)
bool HasHashCheck() const
EXPORT void GetIdentifier(OTIdentifier &theIdentifier) const
static EXPORT bool CreateNewKey(OTString &strOutput, const OTString *pstrDisplay=nullptr, const OTPassword *pAlreadyHavePW=nullptr)
virtual EXPORT ~OTSymmetricKey()