Base64加密解密的方法

    Public Function Encode(ByVal str As String) As String
        Dim encbuff As Byte() = System.Text.Encoding.UTF8.GetBytes(str)
        Return Convert.ToBase64String(encbuff)
    End Function
    Public Function Decode(ByVal str As String) As String
        Dim decbuff As Byte() = Convert.FromBase64String(str)
        Return System.Text.Encoding.UTF8.GetString(decbuff)
    End Function

你可能感兴趣的:(base64)