Code Room
Code reviewHard
Question
Review this Java AES helper used to encrypt user records.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
private static final byte[] IV = new byte[16]; // all zerosprivate static final SecretKeySpec KEY = loadKey(); public static byte[] encrypt(byte[] plaintext) throws Exception { Cipher c = Cipher.getInstance("AES/CBC/PKCS5Padding"); c.init(Cipher.ENCRYPT_MODE, KEY, new IvParameterSpec(IV)); return c.doFinal(plaintext);}Run or narrate your approach, then ask the coach.