HI, All
How to generate such MD5 hash on MCU, if the API is already used, cannot be changed ?
For Android it was used the sub (with help of Encryption lib):
How to generate such MD5 hash on MCU, if the API is already used, cannot be changed ?
For Android it was used the sub (with help of Encryption lib):
B4X:
'algorithm is often used "MD5"
Sub Get_Hash(Text As String, algorithm As String) As String
Dim bc As ByteConverter
Dim md As MessageDigest
Dim data() As Byte
Dim encrypted() As Byte
data = bc.StringToBytes(Text, "UTF-8")
encrypted = md.GetMessageDigest(data, algorithm)
Dim res As String = bc.HexFromBytes(encrypted)
Return (res)
End Sub