pbkdf2

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func WithIterations

func WithIterations[T types.DataType](iterations int) key.Option[T]

func WithSaltSize

func WithSaltSize[T types.DataType](saltSize int) key.Option[T]

Types

type KeyGeneratorImpl

type KeyGeneratorImpl[T types.DataType] struct{}

func (*KeyGeneratorImpl[T]) KeyGen

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

type KeyImpl

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

func (*KeyImpl[T]) Algorithm

func (k *KeyImpl[T]) Algorithm() types.Algorithm

func (*KeyImpl[T]) Decrypt

func (k *KeyImpl[T]) Decrypt(_ T) (plaintext T, err error)

func (*KeyImpl[T]) Encrypt

func (k *KeyImpl[T]) Encrypt(_ T) (ciphertext T, err error)

func (*KeyImpl[T]) Export

func (k *KeyImpl[T]) Export() (key T, err error)

func (*KeyImpl[T]) PublicKey

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

func (*KeyImpl[T]) SKI

func (k *KeyImpl[T]) SKI() T

func (*KeyImpl[T]) Sign

func (k *KeyImpl[T]) Sign(msg T) (signature T, err error)

func (*KeyImpl[T]) Verify

func (k *KeyImpl[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