dongle

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NumberOfPins
)
View Source
const SerialLength = 16

Variables

This section is empty.

Functions

This section is empty.

Types

type Dongle

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

implements keyring.KeySource, crypto.Decrypter, and crypto.Signer

func Find

func Find(typ KeyType) (*Dongle, error)

func (*Dongle) Certificate

func (dongle *Dongle) Certificate() *x509.Certificate

func (*Dongle) Close

func (dongle *Dongle) Close()

func (*Dongle) CommonName

func (dongle *Dongle) CommonName() string

func (*Dongle) ContentsCode

func (dongle *Dongle) ContentsCode() string

func (*Dongle) Decrypt

func (dongle *Dongle) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) ([]byte, error)

func (*Dongle) DecryptKey

func (dongle *Dongle) DecryptKey(b []byte) ([]byte, error)

func (*Dongle) Public

func (dongle *Dongle) Public() crypto.PublicKey

func (*Dongle) Sign

func (dongle *Dongle) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)

func (*Dongle) Type

func (dongle *Dongle) Type() KeyType

type KeyType

type KeyType int
const (
	LicenseKey KeyType = iota
	AccountKey
)

type PinGenerator

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

func NewPinGenerator

func NewPinGenerator(serial []byte) (*PinGenerator, error)

func (*PinGenerator) Generate

func (pg *PinGenerator) Generate() []byte

Jump to

Keyboard shortcuts

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