package
module
Version:
v0.0.0-...-e4b661b
Opens a new window with list of versions in this module.
Published: Jul 10, 2018
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 4
Opens a new window with list of known importers.
Documentation
¶
Package idcheck generates ids that can be verified using the final byte as a checksum.
SetIDReader Sets the reader used to generate new IDs
SetSalt sets the salt to use in hash calculations
ValidID returns true if the ID has the correct length and checksum
ID is an id
FromBase64 creates a new ID from a base64 encoded string
NewID creates a new ID of default length with a random value
Base64 encodes an ID as a base64 string
type IDChecker interface {
NewID() (*ID, error)
ValidID(id *ID) bool
}
IDChecker issues and validates IDs
NewIDChecker returns a new IDChecker
type Option func(*idChecker)
Option is an option for creating IDs
Reader use reader to create new IDs instead of the default rand.Reader
Salt sets the salt to use in hash calculations
Source Files
¶
Click to show internal directories.
Click to hide internal directories.