'StringUtil Library needed
'ByteConverter Library needed
public Sub encodeBase64(str As String) As String
Dim su As StringUtils
Dim bc As ByteConverter
Dim byt() As Byte = bc.StringToBytes(str,"UTF-8")
Dim out As String=su.EncodeBase64(byt)
Return out
End Sub
public Sub decodeBase64(str As String) As String
Dim su As StringUtils
Dim bico As ByteConverter
Dim byt() As Byte=su.DecodeBase64(str)
Dim out As String=bico.StringFromBytes(byt,"UTF-8")
Return out
End Sub