crypto

package
v0.0.0-...-a70b9b0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DigestMethodSha1 = "http://www.w3.org/2000/09/xmldsig#sha1"
View Source
const DigestMethodSha256 = "http://www.w3.org/2000/09/xmldsig#sha256"

Variables

This section is empty.

Functions

This section is empty.

Types

type DigestMethod

type DigestMethod string

type RsaSuite

type RsaSuite struct {
	PrivateKey *rsa.PrivateKey
	Cert       *x509.Certificate
}

func (RsaSuite) Certificate

func (t RsaSuite) Certificate() *x509.Certificate

func (RsaSuite) DecryptRsaOaep

func (t RsaSuite) DecryptRsaOaep(cipherText []byte, dm DigestMethod) ([]byte, error)

func (RsaSuite) SigningKey

func (t RsaSuite) SigningKey() crypto.Signer

type Suite

type Suite interface {
	SigningKey() crypto.Signer
	DecryptRsaOaep(cipherText []byte, digestMethod DigestMethod) ([]byte, error)
}

type TestSuite

type TestSuite struct {
	PrivateKey *rsa.PrivateKey
}

func NewTestSuite

func NewTestSuite() *TestSuite

func (TestSuite) Certificate

func (t TestSuite) Certificate() *x509.Certificate

func (TestSuite) DecryptRsaOaep

func (t TestSuite) DecryptRsaOaep(cipherText []byte, dm DigestMethod) ([]byte, error)

func (TestSuite) EncryptRsaOaep

func (t TestSuite) EncryptRsaOaep(plainText []byte, label []byte) ([]byte, error)

func (TestSuite) SigningKey

func (t TestSuite) SigningKey() crypto.Signer

Jump to

Keyboard shortcuts

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