OK, to answer my own question, the following is needed:
Libs:
ByteConverter
Encryption
B4X:
Dim md As MessageDigest
Dim ByteCon As ByteConverter
Dim passwordhash() As Byte
passwordhash = md.GetMessageDigest(p.GetBytes("UTF8"),"MD5")
dim md5string as String
md5string = ByteCon.HexFromBytes(passwordhash)
msgbox(md5string,"This is the MD5")