crypto

package
v0.0.0-...-f069fcf Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateKey

type PrivateKey interface {
	// Sign signs digest using key k.
	Sign(digest []byte) ([]byte, error)

	// Return a public key paired with this private key
	PublicKey() PublicKey
}

PrivateKey represents a private key that can be used to generate a public key and sign data

type PublicKey

type PublicKey interface {
	// Verify that 'sig' is the signed hash of 'data'
	Verify(digest []byte, sig []byte) (bool, error)
}

PublicKey is a public key that can be used to verify data signed with the corresponding private key

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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