add snapshot documentation.
/// A simple crate to encrypt and decrypt data into snapshot files using sodiumoxide (libsodium).
-/// uses the secret stream chacha20poly1305 symmetric encryption algorithm as its main encryption method.
-/// Snapshot file format contains a signature -> sha256 hashed-salt -> header -> data.
+/// uses the secret stream chacha20poly1305 symmetric encryption algorithm as its default encryption method.
+/// The snapshot format is highlighted in the diagram below. Note: there is no password in the snapshot, the data is
+/// password encrypted.
+///
+/// Snapshot Format
+/// +-----------------+
+/// | Signature bytes |
+/// +=================+
+/// | Version bytes |
+/// +=================+
+/// | Hashed Salt |
+/// +=================+
+/// | Header bytes |
+/// +=================+
+/// | Password |
+/// | Encrypted Data |
+/// +-----------------+
+///
+///
/// Data can be encrypted prior to being put into the snapshot from the system to further secure the snapshot.
-/// The snapshot is sealed with a single password which is used to generate a key. A salt is also generated by NACL
-/// and the key and salt are used to create the header and a push stream to encrypt the data.
+/// The snapshot is sealed with a single password which is used to generate a key. A salt is also generated by
+/// libsodium aka Sodium Oxide. The key and salt are used to create the header and a push stream to encrypt the data.
+///
+/// This process is reversed when decrypting the data. The header and salt are read from the snapshot file and along
+/// with the password they are used to generate a pull stream. The encrypted data is fed into the pull stream and the
+/// data bytes are recovered from the other side.
+///
+/// The structure of the data is not described in this library. So long as the data can be converted to a vector of
+/// bytes or a slice of bytes, it can be written into the snapshot. Libraries such as serde and bincode can be used to
+/// serialize the data into a binary format so that it can be inserted into the encryption stream. Helper functions for
+/// serializing and deserializing HashMaps are included in this library.
+///
mod error;
mod files;
mod logic;
