備忘録

備忘録

2016-06-06から1日間の記事一覧

JavaでAES

public byte[] AesEncrypt(String str) throws Exception { // IV無し // ブロック暗号モード: ECB // パディング: PKCS7 Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.ENCRYPT_MODE, "0123456789ABCDEF"); // Keyは16文字(32bit) retu…