[−][src]Module tink_core::cryptofmt
Provides constants and convenience methods that define the format of ciphertexts and signatures.
Constants
LEGACY_PREFIX_SIZE | Prefix size of legacy key types. The prefix starts with \x00 and followed by a 4-byte key id. |
LEGACY_START_BYTE | First byte of the prefix of legacy key types. |
NON_RAW_PREFIX_SIZE | Prefix size of Tink and Legacy key types. |
RAW_PREFIX | Empty prefix for Raw key types. |
RAW_PREFIX_SIZE | Prefix size of Raw key types. Raw prefix is empty. |
TINK_PREFIX_SIZE | Prefix size of Tink key types. The prefix starts with \x01 and followed by a 4-byte key id. |
TINK_START_BYTE | First byte of the prefix of Tink key types. |
Functions
output_prefix | 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. |