iden

package module
v0.0.0-...-a2f2540 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 License: MIT Imports: 3 Imported by: 0

README

iden

Go library for Sha512 hex identifiers.

Documentation

Overview

Package iden implements secure identifiers. Idens are sent with requests, allowing the server to check if the request is authenticated with a specified key.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iden

type Iden []byte

Iden is a byte slice (with a length of 32 bytes).

func NewIden

func NewIden(salt, key []byte) Iden

NewIden returns a new iden with the salt and key.

func (Iden) Equal

func (i Iden) Equal(iden Iden) bool

Equal checks if an iden is equal to the param iden.

func (Iden) EqualString

func (i Iden) EqualString(iden string) bool

EqualString checks if an iden is equal to the param iden (in string form).

func (Iden) String

func (i Iden) String() string

String returns the iden in a hex-encoded format.

Jump to

Keyboard shortcuts

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