secureid

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKeys        = errors.New("Invalid SecureID Keys")
	InvalidSecureIDString = errors.New("Invalid SecureID String")
)

Functions

func FromFile

func FromFile(filename string) bank.SecureID

func FromOptions

func FromOptions(options Options) bank.SecureID

func New

func New(info secureid.SecureInfo, keyID secureid.KeyID) bank.SecureID

Types

type KeysMap

type KeysMap map[string]*secureid.Keys

type Options

type Options struct {
	Seed    string `json:"seed"`
	Context string `json:"context"`
	KeyID   uint   `json:"keyId"`
}

type SecureIDKeys

type SecureIDKeys struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*SecureIDKeys) FromSecureID

func (p *SecureIDKeys) FromSecureID(context string, secureID secureid.SecureID) (secureid.Value, error)

func (*SecureIDKeys) Parse

func (p *SecureIDKeys) Parse(secureID string) secureid.SecureID

func (*SecureIDKeys) SubKey

func (p *SecureIDKeys) SubKey(context string) *secureid.Keys

func (*SecureIDKeys) ToSecureID

func (p *SecureIDKeys) ToSecureID(context string, value secureid.Value) (secureid.SecureID, error)

func (*SecureIDKeys) ToString

func (p *SecureIDKeys) ToString(secureID secureid.SecureID) string

Jump to

Keyboard shortcuts

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