Public Function AES_Decrypt(ByVal input As String, ByVal pass As String) As String
Dim AES As New RijndaelManaged
Dim Hash_AES As New MD5CryptoServiceProvider
Dim decrypted As String = ""
Try
Dim hash(31) As Byte
Dim temp As Byte() = Hash_AES.ComputeHash(ASCIIEncoding.ASCII.GetBytes(pass))
' Array.Copy(temp, 0, hash, 0, 16)
' Array.Copy(temp, 0, hash, 15, 16)
' AES.Key = hash
AES.Key = temp ' Erel
AES.Mode = CipherMode.ECB
AES.Padding = PaddingMode.PKCS7
Dim DESDecrypter As ICryptoTransform = AES.CreateDecryptor
Dim Buffer As Byte() = Convert.FromBase64String(input)
decrypted = ASCIIEncoding.ASCII.GetString(DESDecrypter.TransformFinalBlock(Buffer, 0, Buffer.Length))
Return decrypted
Catch ex As Exception
Return "Error"
End Try
End Function