// This function will base64 DECODE the string contents // and return them as binary in theData bool OTASCIIArmor::GetData(OTData & theData, bool bLineBreaks) const //linebreaks=true { return GetAndUnpackData(theData, bLineBreaks); size_t outSize = 0; uint8_t * pData = NULL; theData.Release(); if (GetLength() < 1) return true; pData = OT_base64_decode(Get(), &outSize, (bLineBreaks ? 1 : 0)); if (pData) { theData.Assign(pData, outSize); delete [] pData; pData=NULL; return true; } else { OTLog::Error("Error while base64_decoding in OTASCIIArmor::GetData.\n"); return false; } }
// This function will base64 DECODE the string contents // and return them as binary in theData bool OTASCIIArmor::GetData(OTData & theData, bool bLineBreaks) const //linebreaks=true { return GetAndUnpackData(theData, bLineBreaks); }