testutil

package
v0.0.0-...-bd860cc Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKMSSigner

func CreateKMSSigner(keyType kms.KeyType, jwkVM bool) (wrapperapi.FixedKeyCrypto, *pubkey.PublicKey, error)

CreateKMSSigner created signer and corresponding public key.

Types

type BBSSigner

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

BBSSigner makes bbs+ signatures.

func NewBBSSigner

func NewBBSSigner(key *bbs12381g2pub.PrivateKey) (*BBSSigner, error)

NewBBSSigner creates BBSSigner.

func (*BBSSigner) Sign

func (s *BBSSigner) Sign(data []byte) ([]byte, error)

Sign signs a message.

type ECDSASigner

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

ECDSASigner makes ECDSA based signatures.

func CreateEDSASecp256k1

func CreateEDSASecp256k1(jwkVM bool) (*ECDSASigner, *pubkey.PublicKey, error)

CreateEDSASecp256k1 created signer and corresponding public key.

func NewECDSASecp256k1Signer

func NewECDSASecp256k1Signer(privateKey *ecdsa.PrivateKey) *ECDSASigner

NewECDSASecp256k1Signer creates a new ECDSA Secp256k1 signer with generated key.

func (*ECDSASigner) Sign

func (es *ECDSASigner) Sign(msg []byte) ([]byte, error)

Sign signs a message.

type Ed25519Signer

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

Ed25519Signer is a Jose compliant signer.

func NewEd25519Signer

func NewEd25519Signer(ed25519PK []byte) *Ed25519Signer

NewEd25519Signer creates Ed25519Signer.

func (Ed25519Signer) Headers

func (s Ed25519Signer) Headers() jose.Headers

Headers defined to be compatible with jose signer. TODO: remove after jose refactoring.

func (Ed25519Signer) Sign

func (s Ed25519Signer) Sign(data []byte) ([]byte, error)

Sign data.

type PS256Signer

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

PS256Signer is a Jose complient signer.

func CreateRSAPS256

func CreateRSAPS256() (*PS256Signer, *pubkey.PublicKey, error)

CreateRSAPS256 created signer and corresponding public key.

func NewPS256Signer

func NewPS256Signer(privKey *rsa.PrivateKey) *PS256Signer

NewPS256Signer creates PS256Signer.

func (PS256Signer) Headers

func (s PS256Signer) Headers() jose.Headers

Headers defined to be compatible with jose signer. TODO: remove after jose refactoring.

func (PS256Signer) Sign

func (s PS256Signer) Sign(data []byte) ([]byte, error)

Sign data.

type RS256Signer

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

RS256Signer is a Jose complient signer.

func CreateRSARS256

func CreateRSARS256() (*RS256Signer, *pubkey.PublicKey, error)

CreateRSARS256 created signer and corresponding public key.

func NewRS256Signer

func NewRS256Signer(privKey *rsa.PrivateKey) *RS256Signer

NewRS256Signer creates RS256Signer.

func (RS256Signer) Headers

func (s RS256Signer) Headers() jose.Headers

Headers defined to be compatible with jose signer. TODO: remove after jose refactoring.

func (RS256Signer) Sign

func (s RS256Signer) Sign(data []byte) ([]byte, error)

Sign data.

Jump to

Keyboard shortcuts

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