zeroize

fun zeroize(bytes: ByteArray)

Overwrite a sensitive byte array with zeros. Java does not guarantee the array isn't swapped to disk or retained by the GC's copying collector, so this is defense-in-depth, not a hard guarantee. Still worth doing for secrets held on the stack briefly.