crypto

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const EcDsa = 4161
View Source
const EcDsaSha1 = 4162
View Source
const EcDsaSha224 = 4163
View Source
const EcDsaSha256 = 4164
View Source
const EcDsaSha384 = 4165
View Source
const EcDsaSha512 = 4166
View Source
const EdDsa = 4183
View Source
const Mgf1Sha1 = 1
View Source
const Mgf1Sha224 = 5
View Source
const Mgf1Sha256 = 2
View Source
const Mgf1Sha384 = 3
View Source
const Mgf1Sha512 = 4
View Source
const RsaPkcs = 1
View Source
const RsaPkcsOaep = 9
View Source
const RsaPkcsPss = 13
View Source
const RsaPssSha1 = 14
View Source
const RsaPssSha224 = 71
View Source
const RsaPssSha256 = 67
View Source
const RsaPssSha384 = 68
View Source
const RsaPssSha512 = 69
View Source
const RsaSha1 = 6
View Source
const RsaSha224 = 70
View Source
const RsaSha256 = 64
View Source
const RsaSha384 = 65
View Source
const RsaSha512 = 66
View Source
const Sha1 = 544
View Source
const Sha224 = 597
View Source
const Sha256 = 592
View Source
const Sha384 = 608
View Source
const Sha512 = 624

Variables

This section is empty.

Functions

func DecodeBase64

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

func EncodeASN1

func EncodeASN1(rawBase64sig string, mechanism int) ([]byte, error)

func EncodeBase64

func EncodeBase64(data []byte) string

func EncodeHex

func EncodeHex(data []byte) string

func GetECClientMechanism

func GetECClientMechanism(digest string) int

func GetHasher

func GetHasher(digest string) (hash.Hash, crypto.Hash, []byte)

func GetRSAClientMechanism

func GetRSAClientMechanism(digest string) int

func ParseCertificates

func ParseCertificates(data [][]byte) ([]*x509.Certificate, error)

func ParsePEM

func ParsePEM(data []byte) ([]*x509.Certificate, error)

func Verify

func Verify(data []byte, signature []byte, digest string, publicKeyPath string) error

Types

type PSSMechanism

type PSSMechanism struct {
	Mechanism int
	MGF       int
	SaltLen   int
	HashAlg   int
}

func GetPSSMechanism

func GetPSSMechanism(digest string) PSSMechanism

Jump to

Keyboard shortcuts

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