Android Question AES problem

omidaghakhani1368

Well-Known Member
Licensed User
Longtime User
Hi
I use below code for encrypt data with aes
B4X:
Dim b64 As Base64
Dim kg As KeyGenerator
kg.Initialize("AES")
Dim md As MessageDigest
Dim p As String
p = "pas#$@#$DASdasd"
kg.KeyFromBytes(md.GetMessageDigest(p.GetBytes("UTF8"), "MD5"))
Dim c As Cipher
c.Initialize("AES")
Dim data() As Byte
data = c.Encrypt("dennis".GetBytes("UTF8"), kg.Key, False)
Log( b64.EncodeBtoS(data, 0, data.Length))
but output is different is below address.
http://aesencryption.net/
I want to use output in php.
In php that not working.
How solve it?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…