![]() I've done that in several ways: byte password = psswd.getBytes() ĮPasswort = new String(cipher.doFinal(password)) īut the Output is always something the decrypter can't work with: do i convert my String with the Password (!?¿ so my decrypter can work with it? I Know that i can't decrypt the String and that I have to convert the String into an byte. Now i'm trying to decrypt the password with following code: String key = "1234567890123456" // 128 bit keyĬipher.init(Cipher.DECRYPT_MODE, aesKey) ĮPasswort = new String(cipher.doFinal(bpsswd)) //Im facing the problem here The PrintOut is: "!?¿[ŸÊm,r~¤u" which is the correct encrypted password. In my LoginGUI im getting the String with the Password from the database: String psswd = res.getString("Passwort") //Getting the Password from Database and saving it into String Now im saving the String "verschlüsselt" to my Database. String verschlüsselt = new String(encrypted) ![]() The Code im Using to Encrypt the Password with AES: String key = "1234567890123456" // 128 bit keyĬipher.init(Cipher.ENCRYPT_MODE, aesKey) īyte encrypted = cipher.doFinal(Passwort.getBytes()) I want to encrypt the Password from the user and save it to an SQL Database. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |