ASP Base64解码:

Function Bd(byVal si) 'Base64解码
For n=1 To Len(si) Step 4
a=md(Mid(si,n,1))
b=md(Mid(si,n+1,1))
c=md(Mid(si,n+2,1))
d=md(Mid(si,n+3,1))
If b>=0 Then s=s+Chr(((a*4+Int(b/16)) And 255))
If c>=0 Then s=s+Chr(((b*16+Int(c/4)) And 255))
If d>=0 Then s=s+Chr(((c*64+d) And 255))
Next
bd=s
End Function
Function Md(byVal s)
B64C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
If Len(s)=0 Then
md=-1
Exit Function
Else
md=InStr(B64C,s)-1
End If
End Function