signature

package
v0.0.0-...-6c3c161 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifySignature

func VerifySignature(data []byte, signature Signature, publicKey *ecdsa.PublicKey) bool

VerifySignature verifies a signature made over data with the corresponding public key

Types

type Signature

type Signature struct {
	R, S *big.Int
}

Signature representates the signature pair (r,s)

func CreateSignature

func CreateSignature(data []byte, privateKey *ecdsa.PrivateKey) (Signature, error)

CreateSignature creates a signature over data with the provided private Key.

func ParseSignature

func ParseSignature(signatureBase64 string) (Signature, error)

ParseSignature parses base64 encoded signature: base64(r|s)

func (Signature) Serialize

func (s Signature) Serialize() string

Serialize serializes the signature pair(r,s) => base64(r|s)

Jump to

Keyboard shortcuts

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