oaktoken

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package oaktoken provides a secure random string factory that can be used for session or other types of tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Factory

type Factory func() (string, error)

func New

func New(withOptions ...Option) (Factory, error)

func NewURLToken

func NewURLToken(entropyByteCount int) (Factory, error)

type Option

type Option func(*options) error

func WithBodyCharacterSet

func WithBodyCharacterSet(set []byte) Option

func WithDefaultOptions

func WithDefaultOptions() Option

func WithEdgeCharacterSet

func WithEdgeCharacterSet(set []byte) Option

func WithTokenEdgeLength

func WithTokenEdgeLength(l int) Option

func WithTokenLength

func WithTokenLength(l int) Option

Jump to

Keyboard shortcuts

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