crypto

package
v0.0.0-...-e4fce18 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignerVerifier

type SignerVerifier struct{}

SignerVerifier implements methods to Sign and Verify signatures

func (*SignerVerifier) Sign

func (s *SignerVerifier) Sign(secretSeed string, message []byte) (string, error)

Sign signs message using secretSeed. Returns base64-encoded signature.

func (*SignerVerifier) Verify

func (s *SignerVerifier) Verify(publicKey string, message, signature []byte) error

Verify verifies if signature is a valid signature of message signed by publicKey.

type SignerVerifierInterface

type SignerVerifierInterface interface {
	Sign(secretSeed string, message []byte) (string, error)
	Verify(publicKey string, message, signature []byte) error
}

SignerVerifierInterface is the interface that helps mocking SignerVerifier

Jump to

Keyboard shortcuts

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