package sodium-fmt

  1. Overview
  2. Docs

Module Stream.BytesSource

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

Sourcetype storage = bytes
Sourceval secret_key : storage Fmt.t

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

Sourceval nonce : storage Fmt.t

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