crypto

package
v0.0.0-...-c5f9841 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCertSerialNo

func LoadCertSerialNo(certPath string) (string, error)

func LoadPrivKeyAndCert

func LoadPrivKeyAndCert(pfxPath string, password string) (*rsa.PrivateKey, *x509.Certificate, error)

func LoadPrivateKey

func LoadPrivateKey(privKeyPath string) (*rsa.PrivateKey, error)

func LoadPubKeyFromCert

func LoadPubKeyFromCert(certPath string) (*rsa.PublicKey, error)

func LoadPublicKey

func LoadPublicKey(pubKeyPath string) (*rsa.PublicKey, error)

func MD5Digest

func MD5Digest(data []byte) []byte

func ParseCertSerialNo

func ParseCertSerialNo(data []byte) (string, error)

func ParsePrivateKey

func ParsePrivateKey(data []byte) (*rsa.PrivateKey, error)

func ParsePublicKey

func ParsePublicKey(data []byte) (*rsa.PublicKey, error)

func SHA1Digest

func SHA1Digest(data []byte) []byte

SHA1Digest generate a digest

func Sign

func Sign(priKey *rsa.PrivateKey, data []byte) (string, error)

func Verify

func Verify(pubKey *rsa.PublicKey, data []byte, sign string) error

func VerifyRSAWithMD5

func VerifyRSAWithMD5(pubKey *rsa.PublicKey, data []byte, sign string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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