I'm trying to encode my String with AES and CFB. If im doing this
Cipher cipher = Cipher.getInstance("AES/CFB/NoPadding");
, it works fine. But if i'm using "AES/CFB/NoPadding" instead of "AES", then the same String with the same password is different. Here is my Code:
SecretKeySpec key = new SecretKeySpec(cryptPassword.getBytes(), "AES");
byte[] cryptByte = cryptString.getBytes("UTF8");
Cipher cipher = Cipher.getInstance("AES/CFB/NoPadding");
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] hans = cipher.doFinal(cryptByte);
cryptString = Base64.encodeToString(hans,Base64.DEFAULT);
Can someone help me? Thanks a lot!!!