crypto

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGostCrypto

func NewGostCrypto(opts ...Option) (sspvo.Crypto, error)

Types

type Crypto

type Crypto struct {
	// contains filtered or unexported fields
}

func NewCrypto

func NewCrypto(opts ...Option) (Crypto, error)

func (*Crypto) GetCert

func (c *Crypto) GetCert() string

func (*Crypto) Hash

func (c *Crypto) Hash(data []byte) (hash []byte)

type GostCrypto

type GostCrypto struct {
	Crypto
	// contains filtered or unexported fields
}

func (*GostCrypto) GetVerifyCrypto

func (c *GostCrypto) GetVerifyCrypto(cert string) (sspvo.Crypto, error)

func (GostCrypto) Hash

func (c GostCrypto) Hash(data []byte) (hash []byte)

func (GostCrypto) Sign

func (c GostCrypto) Sign(digest []byte) (sign []byte, err error)

func (GostCrypto) Verify

func (c GostCrypto) Verify(sign, digest []byte) (ok bool, err error)

type Option

type Option func(*options)

func SetCert

func SetCert(cert string) Option

func SetKey

func SetKey(key string) Option

Jump to

Keyboard shortcuts

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