|
pure virtual |
This encoding scheme converts the input into a safe set of characters.
All characters are modified by adding a value of 0x20 to result in a valid character set of {0x20 .. 0x5F}. If an encoded value equals 0x20 (or space) it is converted to the Grave Accent character (0x60) as a convention since spaces at the end of a line can be truncated in network protocols.
The parameter pEncoded can be set to NULL. In this case, this function returns the buffer size required to perform the encode operation.
Note that this encoding function does not modify the line terimation convention of the original data. The generated encoded data uses only a line feed character for line termination as this was the convention used in the uuencode definition (was initially built for Unix systems).
pIn | [ in ] Text or binary data to be encoded into uuencoded format |
inSize | [ in ] The number of bytes containing data in the buffer pointed to by pIn |
mode | [ in ] The Unix file privilege bits to be placed on the "begin" line (e.g., 644). |
pFileName | [ in ] The name of the file that the orginal data was taken from. |
pEncoded | [ out ] The data pointed to by pIn converted into uuencoding. |
cBuffer | [ in ] Number of bytes in the buffer pointed to by pEncoded. |
pWritten | [ out ] Optional can be NULL, returns the number of bytes written into pEncoded. This parameter cannot be NULL when pEncoded is also NULL. |
Success | P6R::eOk | |
Failure | P6R::eInvalidArg | pIn or pFileName is NULL. Or inSize is zero or mode is greater than 999. If pEncoded and pWritten are NULL. |
P6R::eTooSmall | The buffer pEncoded is too small to contain the generated value. | |
P6R::eNotInitialized | A successful call to initialize has not been done. |