cryptotest

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package cryptotest provides test-only helpers for the crypto package, following the convention of the standard library's httptest.

Nothing here may be used by production code. A composition root builds its hasher from crypto.DefaultParams; a build that reaches this package outside a test has selected deliberately breakable parameters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hasher

func Hasher() *crypto.Hasher

Hasher returns an argon2id hasher with cheap, test-only cost parameters.

Hashes it produces verify correctly through the ordinary crypto.Verify path: the cost parameters are recorded in the PHC-encoded string and read back on verification, so cheaply-hashed fixtures and production hashes are handled by exactly the same code.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL