Module Box.Bytes

Bytes offers versions of each of the above formatters, which get their value from a bytes value.

type storage = bytes
val secret_key : storage Fmt.t

secret_key formats a secret_key in this fashion: (Box.secret_key AAAAAA==). If the storage value is not Sodium.Box.secret_key_size bytes long, it will be formatted as (Box.secret_key <size mismatch>).

val public_key : storage Fmt.t

public_key formats a public_key in this fashion: (Box.public_key AAAAAA==). If the storage value is not Sodium.Box.public_key_size bytes long, it will be formatted as (Box.public_key <size mismatch>).

val channel_key : storage Fmt.t

channel_key formats a channel_key in this fashion: (Box.channel_key AAAAAA==). If the storage value is not Sodium.Box.channel_key_size bytes long, it will be formatted as (Box.channel_key <size mismatch>).

val nonce : storage Fmt.t

nonce formats a nonce in this fashion: (Box.nonce AAAAAA==). If the storage value is not Sodium.Box.nonce_size bytes long, it will be formatted as (Box.nonce <size mismatch>).