Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString PBase64::CompleteEncoding (  ) 

Complete the base 64 encoding and return the remainder of the encoded Base64 string. Previous data may have been already removed by the GetInterim()# function.

Returns:
Base64 encoded string for the processed data.

Definition at line 288 of file cypher.cxx.

Referenced by PRFC822Channel::NextPart().

{
  char * out = encodedString.GetPointer(encodeLength + 5)+encodeLength;

  switch (saveCount) {
    case 1 :
      *out++ = Binary2Base64[saveTriple[0] >> 2];
      *out++ = Binary2Base64[(saveTriple[0]&3)<<4];
      *out++ = '=';
      *out   = '=';
      break;

    case 2 :
      *out++ = Binary2Base64[saveTriple[0] >> 2];
      *out++ = Binary2Base64[((saveTriple[0]&3)<<4) | (saveTriple[1]>>4)];
      *out++ = Binary2Base64[((saveTriple[1]&15)<<2)];
      *out   = '=';
  }

  return encodedString;
}


Generated by  Doxygen 1.6.0   Back to index