A serialized byte array with a specific content format. This is used to represent data that has
a specific format, such as UTF-8 encoded text, raw bytes, or COSE keys. The content
format is used to determine how the bytes should be interpreted when encrypting or decrypting
the data.
The content format describes the format of the contained bytes. Message encryption always
happens on the byte level, and this allows determining what format the contained data has. For
instance, an EncString in most cases contains UTF-8 encoded text. In some cases it may contain
a Pkcs8 private key, or a COSE key. Specifically, for COSE keys, this allows distinguishing
between the old symmetric key format, represented as ContentFormat::OctetStream, and the new
COSE key format, represented as ContentFormat::CoseKey.
This trait is used to instantiate different typed byte vectors with a specific content format,
using SerializedBytes<C>. This allows for compile-time guarantees about the content format
of the serialized bytes. The exception here is the escape hatch using e.g. from(Vec<u8>),
which can still be mis-used, but has to be misused explicitly.
BitwardenLegacyKeyBytes is a type alias for Bytes with BitwardenLegacyKeyContentFormat. This
is used for the legacy format for symmetric keys. A description of the format is available in
the ContentFormat::BitwardenLegacyKey documentation.
OctetStreamBytes is a type alias for Bytes with OctetStreamContentFormat. This should be used
for e.g. attachments and other data without an explicit content format.