AES 暗号化用に次の Java コードを実行しています。
byte[] iv = new byte[16];
SecretKey aesKey = new SecretKeySpec("hex key here", "AES");
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, aesKey, new IvParameterSpec(iv));
return cipher.doFinal("32 characters here ...".getBytes());
私は常に 48 バイトの出力を取得していますが、32 バイトの入力を想定しているレガシー システムを使用しています。出力の長さはどのように制御できますか?
注: AES CBC を使用する必要があります