1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 8<title>DWC_Base64Decode</title> 9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13<a name="dwc__base64_8h_1ac898ae6e8de3dc936e343140ce8d07d"></a> 14<h1 align="left">DWC_Base64Decode</h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <dwc.h></CODE><BR> 20 <BR> 21 <PRE><CODE>int <a href=DWC_Base64Decode.html#dwc__base64_8h_1ac898ae6e8de3dc936e343140ce8d07d>DWC_Base64Decode</a>(const char *src, 22 const unsigned long srclen, 23 char *dst, 24 const unsigned long dstlen);</CODE></PRE></dd> 25</dl> 26 27<h2>Arguments</h2> 28 29<TABLE border="1" width="100%"> 30 <TBODY> 31 32 <TR> 33<TD width="13%"><EM><STRONG>src</STRONG></EM></TD> 34<TD width="87%">Pointer to the Base64 data to convert.</TD> 35 </TR> 36 37 <TR> 38<TD width="13%"><EM><STRONG>srclen</STRONG></EM></TD> 39<TD width="87%">The data size (string length) of the Base64 data to convert.</TD> 40 </TR> 41 42 <TR> 43<TD width="13%"><EM><STRONG>dst</STRONG></EM></TD> 44<TD width="87%">Pointer to the buffer used to store the post-conversion data.</TD> 45 </TR> 46 47 <TR> 48<TD width="13%"><EM><STRONG>dstlen</STRONG></EM></TD> 49<TD width="87%">Size of the buffer used to store the post-conversion data.</TD> 50 </TR> 51 52 </TBODY> 53</TABLE> 54 55<h2>Return Values</h2> 56 57<TABLE border="1" width="100%"> 58 <TBODY> 59 60 <TR> 61 <TD width="13%"><EM><STRONG>-1</STRONG></EM></TD> 62<TD width="87%">Conversion failed.<br>Either the maximum data size expected after the conversion exceeded the value of the <CODE>dstlen</CODE> argument, or the <CODE>srclen</CODE> argument was not a multiple of four.</TD> 63 </TR> 64 65 <TR> 66<TD width="13%"><EM><STRONG>Zero or greater</STRONG></EM></TD> 67<TD width="87%">The actual size of the data after conversion.</TD> 68 </TR> 69 70 </TBODY> 71</TABLE> 72 73<H2>Description</H2> 74<p>This function decodes the Base64 data designated with <CODE>src</CODE> and outputs it as <CODE>char</CODE>-type data.</p><p>If NULL is designated in <CODE>dst</CODE>, no conversion will occur and the maximum data size expected after the conversion will be returned as the return value. The maximum data size is for the worst case conversion. The actual size is often smaller after conversion.</p><p>This function uses a special type of Base64. This function can decode data that has been encoded with the <A href="DWC_Base64Encode.html">DWC_Base64Encode</a> function.</p> 75 76<H2>Revision History</H2> 77<DL> 78 79</DL> 80<hr><p>CONFIDENTIAL</p></body> 81</html> 82