Pudu programming language
Menu

Std.Crypto.newNonce

1 declaration

fn

newNonce: Result[Bytes, Str]

This is a callable function.

What it does

A fresh nonce of the length `seal` needs, from the same secure source.

Drawn rather than counted, so a program sealing many messages under one key

repeats a nonce only with vanishing probability instead of by a bookkeeping

mistake.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Names inside [ ] are type arguments, such as the item type held by a collection.
  • Result makes success and recoverable failure part of the function's type.

Back to Std.CryptoSearch related declarations