Daily iOS
Security

Secrets left in memory

A security audit says card numbers, passwords, and PINs stay in process memory after they're entered and processed, so they can leak through a memory dump or a crash log. How far can you solve that in Swift and iOS?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Swift String and Data are immutable with copy semantics, so you can't control where the copies end up, and ARC deallocation doesn't wipe memory, which makes complete erasure impossible; the goal is to shrink how long and in how many places the plaintext exists.

Share a question