destroy method

  1. @mustCallSuper
Future<void> destroy()

Prevents this object from being used anymore and attempts to erase cryptographic keys from memory.

Calling this is optional. Any wand will be destroyed automatically when it is garbage collected, but the secrets may exist in the heap for some time before the are overwritten, potentially exposing them to memory dumps.

Implementation

@mustCallSuper
Future<void> destroy() async {
  _hasBeenDestroyed = true;
}