classBase64Class
remConst
dimsBASE_64_CHARACTERS' conversion code
dimlenString' calculates the length of the string
dimiCount' counter
dimreturnValue'Return value
dimtempChar' cache characters
dimtempString' cache string
dimparamString' parameter string
dimtemHex' cache cache hexadecimal
dimtempLow' cache low bit
dimtempHigh' cache high bit
dimmod3String'
dimmod4String'
dimtempBinary'
dimtempByteOne'
dimtempByteTwo'
dimtempByteThree'
dimtempByteFour'
dimtempSaveBitsOne'
dimtempSaveBitsTwo'
'************************************************
'begin initialization class
'************************************************
privatesubClass_Initialize()
sBASE_64_CHARACTERS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"endsub
'************************************************
'end initialization class'
***************************************************
'************************************************
'begin destroy class
'************************************************
PrivateSubClass_Terminate()
sBASE_64_CHARACTERS=""endsub
'************************************************
'end destroy class
'************************************************
'************************************************
'begin Base64 encoding of Ansi-encoded string
'************************************************
publicfunctionEncode(paramString)
tempString=""
returnValue=""
lenString=len(paramString)
iflenString<1then
Encode=returnValue
else
mod3String=lenStringmod3
'The number of digits is to facilitate calculation
ifmod3String>0then
lenString=lenString+3-mod3String
lenString=lenString-3
endif