本文整理汇总了C++中OTASCIIArmor::GetData方法的典型用法代码示例。如果您正苦于以下问题:C++ OTASCIIArmor::GetData方法的具体用法?C++ OTASCIIArmor::GetData怎么用?C++ OTASCIIArmor::GetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OTASCIIArmor
的用法示例。
在下文中一共展示了OTASCIIArmor::GetData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetFromBookendedString
bool OTEnvelope::SetFromBookendedString(
const String& strArmorWithBookends, // input
bool bEscaped)
{
OTASCIIArmor theArmoredText;
const bool bLoaded = theArmoredText.LoadFromString(
const_cast<String&>(strArmorWithBookends),
bEscaped); // std::string str_override="-----BEGIN");
if (bLoaded) {
// This function will base64 DECODE theArmoredText's string contents
// and return them as binary in m_dataContents
const bool bGotData =
theArmoredText.GetData(m_dataContents, true); // bLineBreaks = true
if (!bGotData)
otErr << __FUNCTION__ << ": Failed while calling: "
"theArmoredText.GetData\n";
else
return true;
}
else
otErr << __FUNCTION__ << ": Failed while calling: "
"theArmoredText.LoadFromString\n";
return false;
}
示例2:
OTData::OTData(const OTASCIIArmor &theSource) : m_pData(NULL), m_lPosition(0), m_lSize(0)
{
if (theSource.Exists())
theSource.GetData(*this); // ***********
}
示例3: SetAsciiArmoredData
// Should be called "Set This Envelope's binary ciphertext data, from an
// ascii-armored input string."
//
// Let's say you just retrieved the ASCII-armored contents of an encrypted
// envelope.
// Perhaps someone sent it to you, and you just read it out of his message.
// And let's say you want to get those contents back into binary form in an
// Envelope object again, so that they can be decrypted and extracted back as
// plaintext. Fear not, just call this function.
//
bool OTEnvelope::SetAsciiArmoredData(const OTASCIIArmor& theArmoredText,
bool bLineBreaks)
{
return theArmoredText.GetData(m_dataContents, bLineBreaks);
}
示例4: SetAsciiArmoredData
// Let's say you just retrieved the ASCII-armored contents of an encrypted envelope.
// Perhaps someone sent it to you, and you just read it out of his message.
// And let's say you want to get those contents back into binary form in an
// Envelope object again, so that they can be decrypted and extracted back as
// plaintext. Fear not, just call this function.
// should be called "Set Via Ascii Armored Data"
bool OTEnvelope::SetAsciiArmoredData(const OTASCIIArmor & theArmoredText)
{
return theArmoredText.GetData(m_dataContents);
}
示例5:
OTData::OTData(const OTASCIIArmor& source)
{
if (source.Exists()) {
source.GetData(*this);
}
}