当前位置: 首页>>代码示例>>C++>>正文


C++ OTASCIIArmor::GetData方法代码示例

本文整理汇总了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;
}
开发者ID:yamamushi,项目名称:opentxs,代码行数:27,代码来源:OTEnvelope.cpp

示例2:

OTData::OTData(const OTASCIIArmor &theSource) : m_pData(NULL), m_lPosition(0), m_lSize(0)
{	
	if (theSource.Exists())
		theSource.GetData(*this); // ***********
}
开发者ID:BugRogers101,项目名称:Open-Transactions,代码行数:5,代码来源:OTData.cpp

示例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);
}
开发者ID:yamamushi,项目名称:opentxs,代码行数:15,代码来源:OTEnvelope.cpp

示例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);
}
开发者ID:Mindonaut,项目名称:Open-Transactions,代码行数:10,代码来源:OTEnvelope.cpp

示例5:

OTData::OTData(const OTASCIIArmor& source)
{
    if (source.Exists()) {
        source.GetData(*this);
    }
}
开发者ID:Kodachi75,项目名称:opentxs,代码行数:6,代码来源:OTData.cpp


注:本文中的OTASCIIArmor::GetData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。