Module tink_core::cryptofmt[][src]

Expand description

Provides constants and convenience methods that define the format of ciphertexts and signatures.

Constants

Prefix size of legacy key types. The prefix starts with \x00 and followed by a 4-byte key id.

First byte of the prefix of legacy key types.

Prefix size of Tink and Legacy key types.

Empty prefix for Raw key types.

Prefix size of Raw key types. Raw prefix is empty.

Prefix size of Tink key types. The prefix starts with \x01 and followed by a 4-byte key id.

First byte of the prefix of Tink key types.

Functions

Generate the prefix of ciphertexts produced by the crypto primitive obtained from key. The prefix can be either empty (for RAW-type prefix), or consists of a 1-byte indicator of the type of the prefix, followed by 4 bytes of the key ID in big endian encoding.