cryptoapi

package
v5.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: BSD-3-Clause Imports: 1 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnsupportedKeyErr = errors.New("key unsupported")
)

Functions

This section is empty.

Types

type AccessTokenSigner

type AccessTokenSigner interface {
	GenerateTokenSignature(data []byte, privateKey interface {
		IsPrivate() bool
		Identifier() []byte
	}) ([]byte, error)
	VerifyTokenSignature(data []byte, signature []byte, publicKey interface {
		IsPublic() bool
		Identifier() []byte
	}) error
	GetAlgorithm() string
}

type CardCrypto

type CardCrypto interface {
	GenerateSignature(data []byte, key interface {
		IsPrivate() bool
		Identifier() []byte
	}) ([]byte, error)
	VerifySignature(data []byte, signature []byte, key interface {
		IsPublic() bool
		Identifier() []byte
	}) error
	ExportPublicKey(key interface {
		IsPublic() bool
		Identifier() []byte
	}) ([]byte, error)
	ImportPublicKey(publicKeySrc []byte) (interface {
		IsPublic() bool
		Identifier() []byte
	}, error)
	GenerateSHA512(data []byte) []byte
}

type Keypair added in v5.0.8

type Keypair interface {
	PublicKey() interface {
		IsPublic() bool
		Identifier() []byte
	}

	PrivateKey() interface {
		IsPrivate() bool
		Identifier() []byte
	}
}

type PrivateKey

type PrivateKey interface {
	IsPrivate() bool
	Identifier() []byte
}

type PrivateKeyExporter

type PrivateKeyExporter interface {
	ExportPrivateKey(key interface {
		IsPrivate() bool
		Identifier() []byte
	}) ([]byte, error)
	ImportPrivateKey(data []byte) (interface {
		IsPrivate() bool
		Identifier() []byte
	}, error)
}

type PrivateKeyStorage

type PrivateKeyStorage interface {
	Store(key interface {
		IsPrivate() bool
		Identifier() []byte
	}, name string, meta map[string]string) error

	Load(name string) (key interface {
		IsPrivate() bool
		Identifier() []byte
	}, meta map[string]string, err error)

	Delete(name string) error
}

type PublicKey

type PublicKey interface {
	IsPublic() bool
	Identifier() []byte
}

Jump to

Keyboard shortcuts

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