Code Room
Code reviewHard
Question
Review this Java field-encryption helper for PII.
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
public byte[] encrypt(byte[] plaintext, SecretKey key) throws Exception { Cipher c = Cipher.getInstance("AES"); // provider default c.init(Cipher.ENCRYPT_MODE, key); return c.doFinal(plaintext);} public byte[] decrypt(byte[] ct, SecretKey key) throws Exception { Cipher c = Cipher.getInstance("AES"); c.init(Cipher.DECRYPT_MODE, key); return c.doFinal(ct);}Run or narrate your approach, then ask the coach.