I'am trying to encrypt a String using AES-128 algorithm with given Key.
Implemented by Java, I used the solution here.
public static void main(String[] args) {
String key = "Bar12345Bar12345"; // 128 bit key
String initVector = "RandomInitVector"; // 16 bytes IV
System.out.println(encrypt(key, initVector, "System")));
}
Result:
encrypted string: iHvz04u8X7FPo7yagSLthA==
The above result is not what I want, I expect ZJfsFFLjl6YS0Xys5OUVIA==
to be the encrypted value of System
.
Like the flowing Test On : http://aesencryption.net/
Any propositions?