erase method

void erase()

Securely overwrites all sensitive data with zeros.

Call this method after successfully sending the verifiers to the server to prevent the ephemeral key and session verifier from lingering in memory.

Implementation

void erase() {
  userId = ''; // Allows string to be GC.
  ephemeralUserPublicKey.overwriteWithZeros();
  sessionKeyVerifier.overwriteWithZeros();
}