secure

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntegerIDHasher

type IntegerIDHasher interface {
	Encode(n int64) (string, error)
	Decode(s string) (int64, error)
}

IntegerIDHasher encode/decode integer id for secure reason

type SignClaims

type SignClaims map[string]interface{}

SignClaims claims for sign

type Signer

type Signer interface {
	// Sign data and returns the signed data as a string
	Sign(claims SignClaims) (string, error)

	// Validate the sign data and decode data to out interface
	Validate(in string) (SignClaims, error)
}

Signer sign data to make sure data is valid and not changed illegally

Jump to

Keyboard shortcuts

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