csrf

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TokenLength = 32 // bytes

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken() (string, error)

GenerateToken creates a cryptographically secure random token

func ValidateToken

func ValidateToken(cookieToken, formToken string) bool

ValidateToken compares the cookie token with the form token

Types

This section is empty.

Jump to

Keyboard shortcuts

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