p; c1 = base64DecodeChars(Asc(Mid(str, i + 1, 1)) And 255)
i = i + 1
Loop While (i < len1 And c1 = -1)
If (c1 = -1) Then
base64decode = out
Exit Function
End If
Do
c2 = base64DecodeChars(Asc(Mid(str, i + 1, 1)) And 255)
i = i + 1
Loop While (i < len1 And c2 = -1)
If (c2 = -1) Then
base64decode = out
Exit Function
End If
out = out + Chr((c1 * 4) Or ((c2 And 48) \ 16))
Do
c3 = base64DecodeChars(Asc(Mid(str, i + 1, 1)) And 255)
i = i + 1
If (c3 = 61) Then
base64decode = out
c3 = base64DecodeChars(c3)
End If
Loop While (i < len1 And c3 = -1)
If (c3 = -1) Then
base64decode = out
Exit Function
End If
out = out + Chr(((c2 And 15) * 16) Or ((c3 And 60) \ 4))
Do
c4 = base64DecodeChars(Asc(Mid(str, i + 1, 1)) And 255)
i = i + 1
If (c4 = 61) Then
base64decode = out