plugin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(cc CreateClientIDFunc, expiration int64, sign []byte, publicKey *rsa.PublicKey) error

Verify verify machine-id signature

func Wrap

func Wrap(client ClientID, expiration int64) ([]byte, error)

Types

type ClientID

type ClientID interface {
	// Load clientID data
	Load() error
	// Serialize parameter is unix timestamp of expiration
	Serialize() ([]byte, error)
	// Deserialize deserialize and return unix timestamp of expiration
	Deserialize([]byte) error
}

ClientID the client unique identification

func Unwrap

func Unwrap(raw []byte, ccf CreateClientIDFunc, opts ...Option) (ClientID, int64, error)

type CreateClientIDFunc

type CreateClientIDFunc func(...Option) ClientID

CreateClientIDFunc The function signature of create ClientID

type Option

type Option func(ClientID)

Option for clientID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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