sessid

package
v0.0.0-...-2887d17 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package sessid provides a random cryptographically secure session identifier generator

Index

Constants

View Source
const MinIDLength = 16

MinIDLength defines the minimum identifier length

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator represents a non-thread-safe cryptographically secure session id generator

func NewGenerator

func NewGenerator(idLength uint) (*Generator, error)

NewGenerator creates a new session id generator instance

func (*Generator) New

func (g *Generator) New() (SessionID, error)

New generates a new session identifier

WARNING: this method isn't thread safe!

type SessionID

type SessionID string

SessionID represents a cryptographically secure session identifier

Jump to

Keyboard shortcuts

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