5 releases

0.5.0 Mar 5, 2024
0.4.3 Jan 22, 2024
0.4.2 Jan 18, 2024
0.4.1 Jan 15, 2024
0.4.0 Jan 10, 2024

#1633 in Cryptography

34 downloads per month
Used in 5 crates (4 directly)

MIT license

73KB
978 lines

The backend of a container

Create a container

The Create trait is used to create a new instance of a Backend.

Mainly, is performs the following tasks:

  1. It creates the Backend::Settings of the backend. The settings contains runtime information which are stored in the header of the container. Later, when the container is opened again, the settings are extracted from the header and passed back to the backend.
  2. It creates the header of the backend instance using the HeaderSet trait. Its gets the binary data of the header (which already contains the binary encoded settings) and must store it at a suitable location.
  3. The final [Create::build()] call creates the backend instance, which is used by the container.

Open a container

The Open trait is used to open an existing Backend instance.

The container asks the trait for the binary header data using the HeaderGet trait. The implementation should load it from a suitable location.

The final [Open::build()] call creates the backend instance, which is used by the container.

Dependencies

~330–790KB
~18K SLoC