' Dim cipherText() As Byte = EncryptText(txPassword.Text,PwdKey)
' Dim cText As String = BytesToString(cipherText,0,cipherText.Length,"utf8")
Dim kg As KeyGenerator
Dim c As Cipher
c.Initialize("DES/ECB/NoPadding")
kg.Initialize("DES")
Dim b() As Byte = PwdKey.GetBytes("UTF8")
Log("key length = " & b.Length)
kg.KeyFromBytes(b)
Dim cText As String = padString(txPassword.Text)
Log("cText.len = " & cText.Length)
Dim data(0) As Byte = bConv.StringToBytes(cText,"UTF8")
Log("data length = " & data.Length)
data = c.Encrypt(data,kg.Key,False)
cText = bConv.HexFromBytes(data)
' this did not work either cText = BytesToString(data,0,data.Length,"utf8")
mLog("SB","cText = " & cText)
mLog("SB","rspPassword = " & rspPassword)
If rspPassword <> cText Then
ToastMessageShow("Invalid User Name or Password",False)
Job.Release
fInTrans = False
Return
End If