Skip to main content

Module drop_strategy

Module drop_strategy 

Source
Expand description

Drop strategies for handling encrypted data when it goes out of scope.

This module provides different strategies for what happens to decrypted data when an Encrypted value is dropped. Each strategy implements the DropStrategy trait.

§Available Strategies

  • Zeroize: Overwrites the buffer with zeros using the zeroize crate
  • NoOp: Does nothing, leaving the data in memory as-is

Algorithm-specific strategies:

§Generic Over Extra Data

These strategies are generic over the Extra type to support different algorithms that may need to store additional data (like encryption keys).

Structs§

NoOp
Does nothing on drop. Generic over the Extra type to work with any algorithm.
Zeroize
Zeroizes the buffer on drop. Generic over the Extra type to work with any algorithm.

Traits§

DropStrategy