cryptotest

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Test

func Test[PrivateKey, PublicKey any](t *testing.T, i Implementation[PrivateKey, PublicKey], opts ...Option)

Types

type Implementation

type Implementation[PrivateKey any, PublicKey any] struct {
	NewPrivateKey       func() (PrivateKey, error)
	MarshalPrivateKey   func(key PrivateKey) ([]byte, error)
	UnmarshalPrivateKey func(b []byte) (PrivateKey, error)
	Public              func(key PrivateKey) PublicKey
	MarshalPublicKey    func(key PublicKey) ([]byte, error)
	UnmarshalPublicKey  func(b []byte) (PublicKey, error)
	Sign                func(key PrivateKey, data []byte) ([]byte, error)
	Verify              func(key PublicKey, data, sig []byte) bool
}

type Option

type Option func(*options)

func WithCmpOptions

func WithCmpOptions(opt ...cmp.Option) Option

func WithOpenSSLTest

func WithOpenSSLTest(arg ...string) Option

Jump to

Keyboard shortcuts

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