ecdsa

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedMethod = errors.New("ecdsa: unsupported method")
)

Functions

This section is empty.

Types

type KeyGeneratorImpl

type KeyGeneratorImpl[T types.DataType] struct{}

func (*KeyGeneratorImpl[T]) KeyGen

func (e *KeyGeneratorImpl[T]) KeyGen(alg types.Algorithm, opts ...key.Option[T]) (key.Key[T], error)

type KeyImportImpl

type KeyImportImpl[T types.DataType] struct{}

func (*KeyImportImpl[T]) KeyImport

func (e *KeyImportImpl[T]) KeyImport(raw interface{}, alg types.Algorithm, opts ...key.Option[T]) (key.Key[T], error)

type PrivateKey

type PrivateKey[T types.DataType] struct {
	// contains filtered or unexported fields
}

func (*PrivateKey[T]) Algorithm added in v0.1.2

func (e *PrivateKey[T]) Algorithm() types.Algorithm

func (*PrivateKey[T]) Decrypt

func (e *PrivateKey[T]) Decrypt(_ T) (plaintext T, err error)

func (*PrivateKey[T]) Encrypt

func (e *PrivateKey[T]) Encrypt(_ T) (ciphertext T, err error)

func (*PrivateKey[T]) Export added in v0.1.2

func (e *PrivateKey[T]) Export() (key T, err error)

func (*PrivateKey[T]) PublicKey

func (e *PrivateKey[T]) PublicKey() (key.Key[T], error)

func (*PrivateKey[T]) SKI

func (e *PrivateKey[T]) SKI() T

func (*PrivateKey[T]) Sign

func (e *PrivateKey[T]) Sign(msg T) (signature T, err error)

func (*PrivateKey[T]) Verify

func (e *PrivateKey[T]) Verify(_, _ T) (bool, error)

type PublicKey

type PublicKey[T types.DataType] struct {
	// contains filtered or unexported fields
}

func (*PublicKey[T]) Algorithm added in v0.1.2

func (e *PublicKey[T]) Algorithm() types.Algorithm

func (*PublicKey[T]) Decrypt

func (e *PublicKey[T]) Decrypt(_ T) (T, error)

func (*PublicKey[T]) Encrypt

func (e *PublicKey[T]) Encrypt(_ T) (T, error)

func (*PublicKey[T]) Export added in v0.1.2

func (e *PublicKey[T]) Export() (key T, err error)

func (*PublicKey[T]) PublicKey

func (e *PublicKey[T]) PublicKey() (key.Key[T], error)

func (*PublicKey[T]) SKI

func (e *PublicKey[T]) SKI() T

func (*PublicKey[T]) Sign

func (e *PublicKey[T]) Sign(_ T) (T, error)

func (*PublicKey[T]) Verify

func (e *PublicKey[T]) Verify(msg, signature T) (bool, error)

Jump to

Keyboard shortcuts

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