tufanv Expert Licensed User Longtime User Feb 23, 2016 #1 Hello, I tried to convert a b4a example to b4i but couldnt work it out. Can you help me convert a simple string to md5 ? TY
Hello, I tried to convert a b4a example to b4i but couldnt work it out. Can you help me convert a simple string to md5 ? TY
JanPRO Well-Known Member Licensed User Longtime User Feb 23, 2016 #2 Hi, you can use the following sub: Code: Copy Sub GetMD5 (Text As String) As String Dim MD As MessageDigest Dim Data() As Byte = MD.GetMessageDigest(Text.GetBytes("UTF8"),"MD5") Dim BC As ByteConverter Return BC.HexFromBytes(Data) End Sub Don't forget to reference to the iEncryption and iRandomAccessFile library Upvote 0
Hi, you can use the following sub: Code: Copy Sub GetMD5 (Text As String) As String Dim MD As MessageDigest Dim Data() As Byte = MD.GetMessageDigest(Text.GetBytes("UTF8"),"MD5") Dim BC As ByteConverter Return BC.HexFromBytes(Data) End Sub Don't forget to reference to the iEncryption and iRandomAccessFile library