Pudu programming language
Menu

Std.Http.Server.Security.generateNonce

1 declaration

fn

generateNonce: Int -> Str

This is a callable function.

What it does

Generates a hexadecimal nonce for per-request CSP inline script/style authorization.

Uses `seed` when positive for deterministic testing; draws from OS cryptographic

entropy (`Std.Random.secureBytes`) when `seed <= 0`.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.

Back to Std.Http.Server.SecuritySearch related declarations