*/
public class AES {
// TODO gwt-crypto doesn't let you set the IV. rewrite?
public static String encrypt(String key, String iv, String value) {
AESCipher cipher = new AESCipher();
cipher.setKey(Hash.hash256(key.getBytes()));
try {
return cipher.encrypt(value);
} catch (InvalidCipherTextException e) {
throw new RuntimeException(e);
}
}