void decode(const char* pSrc, int src_len, unsigned char* pDst,int * outl)
{
int nValue;
nValue = DeBase64Tab[*pSrc++] << 18;
nValue += DeBase64Tab[*pSrc++] << 12;
*pDst++ = (nValue & 0x00ff0000) >> 16;
{
int nValue;
nValue = DeBase64Tab[*pSrc++] << 18;
nValue += DeBase64Tab[*pSrc++] << 12;
*pDst++ = (nValue & 0x00ff0000) >> 16;
const
DeBase64Tab : array[AnsiChar] of AnsiChar = (XX,XX,XX这里就是Base64的编码表);procedure decode(pSrc :PAnsiChar; src_Len : Integer; pDst : Pointer; var outl : Integer);
var
nValue : Integer;
begin
nValue := Ord(DeBase64Tab[pSrc^]) shl 18;
Inc(pSrc);
Inc(nValue, Ord(DeBase64Tab[pSrc^]) shl 12);
Inc(pSrc);
PAnsiChar(pDst)^ := AnsiChar((nValue and $00ff0000) shr 16);
Inc(PAnsiChar(pDst));
end;
pDst: PByte; out1: PInteger);
var
pTmpSrc: PAnsiChar;
pTmpDst: PByte;
nValue: Integer;
begin
pTmpSrc := pSrc;
pTmpDst := pDst;
nValue := DeBase64Tab[Ord(pTmpSrc^)] shl 18;
inc(pTmpSrc);
inc(nValue, DeBase64Tab[Ord(pTmpSrc^)] shl 12);
inc(pTmpSrc);
pTmpDst^ := Byte((nValue and $ff0000) shr 16);
inc(pTmpDst);
end;