aloslicense

package
v0.0.0-...-bb5e2a3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client generates license challenges and verifies server responses.

func NewClient

func NewClient(pw1, pw2, pw3 string) (*Client, error)

NewClient creates a Client from three passwords. Each password must be at least 8 characters.

func (*Client) Generate

func (c *Client) Generate() (string, error)

Generate returns a new 128-character alphanumeric challenge token.

func (*Client) VerifyResponse

func (c *Client) VerifyResponse(challenge, response string) bool

VerifyResponse reports whether response is a valid server reply bound to challenge.

type Server

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

Server verifies license challenges and generates bound response tokens.

func NewServer

func NewServer(pw1, pw2, pw3 string) (*Server, error)

NewServer creates a Server from three passwords. Each password must be at least 8 characters.

func (*Server) Close

func (s *Server) Close()

Close stops the background cleanup goroutine for the used-token cache.

func (*Server) Verify

func (s *Server) Verify(challenge string) (response string, ok bool)

Verify checks whether challenge is valid and has not been used. If valid, it returns a response token bound to the challenge and ok=true.

Jump to

Keyboard shortcuts

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