package testonly

import "github.com/google/trillian/crypto/keys/testonly"

Package testonly contains code and data that should only be used by tests. Production code MUST NOT depend on anything in this package. This will be enforced by tools where possible.

Index

Functions

func MustMarshalPublicPEMToDER

func MustMarshalPublicPEMToDER(keyPEM string) []byte

MustMarshalPublicPEMToDER reads a PEM-encoded public key and returns it in DER encoding. If an error occurs, it panics.

func SignAndVerify

func SignAndVerify(signer crypto.Signer, pubKey crypto.PublicKey) error

SignAndVerify exercises a signer by using it to generate a signature, and then verifies that this signature is correct.

Source Files

keys.go

Version
v1.7.1 (latest)
Published
Jan 9, 2025
Platform
linux/amd64
Imports
12 packages
Last checked
5 days ago

Tools for package owners.