Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
opentxs::OTCrypto_Decrypt_Output Class Reference

#include <OTCrypto.hpp>

Public Member Functions

EXPORT ~OTCrypto_Decrypt_Output ()
 
EXPORT OTCrypto_Decrypt_Output (const OTCrypto_Decrypt_Output &rhs)
 
EXPORT OTCrypto_Decrypt_Output (OTPassword &thePassword)
 
EXPORT OTCrypto_Decrypt_Output (OTPayload &thePayload)
 
EXPORT void swap (OTCrypto_Decrypt_Output &other)
 
EXPORT OTCrypto_Decrypt_Outputoperator= (OTCrypto_Decrypt_Output other)
 
EXPORT bool Concatenate (const void *pAppendData, uint32_t lAppendSize) const
 
EXPORT void Release ()
 
EXPORT void Release_Envelope_Decrypt_Output () const
 

Detailed Description

Definition at line 199 of file OTCrypto.hpp.

Constructor & Destructor Documentation

opentxs::OTCrypto_Decrypt_Output::~OTCrypto_Decrypt_Output ( )

Definition at line 774 of file OTCrypto.cpp.

775 {
776  // We don't own these objects.
777  // Rather, we own a pointer to ONE of them, since we are a wrapper
778  // for this one or that.
779  //
780  m_pPassword = nullptr;
781  m_pPayload = nullptr;
782 
783  // Since this is merely a wrapper class, we don't actually Release() these
784  // things.
785  // However, we DO have a release function, since the programmatic USER of
786  // this class
787  // MAY wish to Release() whatever it is wrapping.
788  //
789  // Release_Envelope_Decrypt_Output();
790 }
opentxs::OTCrypto_Decrypt_Output::OTCrypto_Decrypt_Output ( const OTCrypto_Decrypt_Output rhs)

Definition at line 792 of file OTCrypto.cpp.

794  : m_pPassword(nullptr),
795  m_pPayload(nullptr)
796 {
797  m_pPassword = rhs.m_pPassword;
798  m_pPayload = rhs.m_pPayload;
799 }
opentxs::OTCrypto_Decrypt_Output::OTCrypto_Decrypt_Output ( OTPassword thePassword)

Definition at line 801 of file OTCrypto.cpp.

802  : m_pPassword(&thePassword)
803  , m_pPayload(nullptr)
804 {
805 }
opentxs::OTCrypto_Decrypt_Output::OTCrypto_Decrypt_Output ( OTPayload thePayload)

Definition at line 807 of file OTCrypto.cpp.

808  : m_pPassword(nullptr)
809  , m_pPayload(&thePayload)
810 {
811 }

Member Function Documentation

bool opentxs::OTCrypto_Decrypt_Output::Concatenate ( const void *  pAppendData,
uint32_t  lAppendSize 
) const

Definition at line 855 of file OTCrypto.cpp.

857 {
858  OT_ASSERT((m_pPassword != nullptr) || (m_pPayload != nullptr));
859 
860  if (nullptr != m_pPassword) {
861  if (static_cast<int32_t>(lAppendSize) ==
862  static_cast<int32_t>(m_pPassword->addMemory(
863  pAppendData, static_cast<uint32_t>(lAppendSize))))
864  return true;
865  else
866  return false;
867  }
868 
869  if (nullptr != m_pPayload) {
870  m_pPayload->Concatenate(pAppendData, lAppendSize);
871  return true;
872  }
873  return false;
874 }
EXPORT int32_t addMemory(const void *append, uint32_t size)
Definition: OTPassword.cpp:944
#define OT_ASSERT(x)
Definition: Assert.hpp:150
EXPORT void Concatenate(const void *data, uint32_t size)
Definition: OTData.cpp:333
OTCrypto_Decrypt_Output & opentxs::OTCrypto_Decrypt_Output::operator= ( OTCrypto_Decrypt_Output  other)

Definition at line 826 of file OTCrypto.cpp.

828 {
829  // swap this with other
830  swap(other);
831 
832  // by convention, always return *this
833  return *this;
834 }
EXPORT void swap(OTCrypto_Decrypt_Output &other)
Definition: OTCrypto.cpp:813
void opentxs::OTCrypto_Decrypt_Output::Release ( )

Definition at line 837 of file OTCrypto.cpp.

838 {
839  OT_ASSERT((m_pPassword != nullptr) || (m_pPayload != nullptr));
840 
842 
843  // no need to call ot_super::Release here, since this class has no
844  // superclass.
845 }
#define OT_ASSERT(x)
Definition: Assert.hpp:150
EXPORT void Release_Envelope_Decrypt_Output() const
Definition: OTCrypto.cpp:848
void opentxs::OTCrypto_Decrypt_Output::Release_Envelope_Decrypt_Output ( ) const

Definition at line 848 of file OTCrypto.cpp.

849 {
850  if (nullptr != m_pPassword) m_pPassword->zeroMemory();
851 
852  if (nullptr != m_pPayload) m_pPayload->Release();
853 }
EXPORT void zeroMemory()
Definition: OTPassword.cpp:281
virtual EXPORT void Release()
Definition: OTData.cpp:257
void opentxs::OTCrypto_Decrypt_Output::swap ( OTCrypto_Decrypt_Output other)

Definition at line 813 of file OTCrypto.cpp.

819 {
820  if (&other != this) {
821  std::swap(m_pPassword, other.m_pPassword);
822  std::swap(m_pPayload, other.m_pPayload);
823  }
824 }

The documentation for this class was generated from the following files: