1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" /> 7 <title>FromBase64String</title> 8 </head> 9 <body> 10 <h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/util/Overview.html">util</a>::<a href="../../../nn/util/Base64/Overview.html">Base64</a>::FromBase64String</CODE> Member Function</h1> 11 <h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static <a href="../../../nn/Result/Overview.html">nn::Result</a> FromBase64String( 15 const char * pSrc, 16 void * pDst, 17 size_t sizeDst, 18 size_t * pNum 19); 20</pre> 21 </div> 22 <h2>Parameters</h2> 23 <div class="section"> 24 <table class="arguments"> 25 <thead> 26 <tr> 27 <td width="15" /> 28 <th>Name</th> 29 <td>Description</td> 30 </tr> 31 </thead> 32 <tr> 33 <td>in</td> 34 <th><CODE>pSrc</CODE></th> 35 <td>Pointer to base-64 format string entry.</td> 36 </tr> 37 <tr> 38 <td>out</td> 39 <th>pDst</th> 40 <td>Pointer to buffer for storing the output data.</td> 41 </tr> 42 <tr> 43 <td>in</td> 44 <th>sizeDst</th> 45 <td>Size of the buffer specified by <SPAN class="argument">pDst</SPAN>.</td> 46 </tr> 47 <tr> 48 <td>out</td> 49 <th>pNum</th> 50 <td>Pointer storing the number of characters actually output.</td> 51 </tr> </table> 52 </div> 53 <h2>Return Values</h2> 54 <div class="section">Returns an indication of whether the conversion was successful. </div> 55 <h2>Description</h2> 56 <div class="section"> 57 <p>Converts a base-64 format string into binary data.</p><p> 58 The number of bytes written to the destination buffer is written to <SPAN class="argument">*pNum</SPAN>. 59 </p><p> 60 This function parses the entered string according to the following rules: 61 <UL><LI>There is no limit to the number of characters in one line.</LI><LI>Spaces and linefeed characters (0x09, 0x0a, 0x0d, 0x20) are simply skipped over.</LI><LI>Data are treated as invalid if they contain characters that are not suitable for use as base-64 characters nor as space and linefeed characters.</LI><LI>The NULL character (0x00) terminates the data. However, if the padding character "=" (0x3d) appears, this is treated as the effective end of the data.</LI></UL></p><p> 62 One of the following errors is returned when the conversion fails: 63 <UL><LI><CODE><a href="../../../nn/util/ResultInvalidPtr/Overview.html">nn::util::ResultInvalidPtr</a></CODE> - Pointer given as a parameter is invalid.</LI><LI><CODE><a href="../../../nn/util/ResultBadData/Overview.html">nn::util::ResultBadData</a></CODE> - The format of the entered string is invalid.</LI><LI><CODE><a href="../../../nn/util/ResultBufferFull/Overview.html">nn::util::ResultBufferFull</a></CODE> - The output destination buffer is not large enough.</LI></UL> 64 The conversion process proceeds until the failure occurs, and <SPAN class="argument">*pNum</SPAN> gets the number of bytes that were written before the failure. 65 </p></div> 66 <h2>Revision History</h2> 67 <div class="section"> 68 <dl class="history"> 69 <dt>2011/12/19</dt> 70 <dd>Initial version.<br /> 71 </dd> 72 </dl> 73 </div> 74 <hr><p>CONFIDENTIAL</p></body> 75</html> 76