tokenizer

package
v0.0.0-...-4eb781d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tokenizer

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

Tokenizer holds the key used for encrypt/decrypt operations

func NewTokenizer

func NewTokenizer(encKey string, hashKey string) (*Tokenizer, error)

NewTokenizer returns a Tokenizer instance and error if key is not correct size

func (*Tokenizer) Open

func (t *Tokenizer) Open(data string, v interface{}) error

Open an encrypted TokenRequest, verifies, unserializes and stores the result in the value pointed to by v. v must be a pointer or non-nil.

func (*Tokenizer) Seal

func (t *Tokenizer) Seal(v interface{}) (string, error)

Seal serializes a Token and encrypts+signs the payload

Jump to

Keyboard shortcuts

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