Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyID ¶
GenerateKeyID will compute a SHA1-hash of the public key der bytes and use the first keyIDLength characters as the key id (kid) to return.
func MarshalPEMBlock ¶
MarshalPEMBlock will marshal the PEM block in a way that will allow marshaling in a JSON payload.
Types ¶
type ECDSA ¶
type ECDSA struct { Private *ecdsa.PrivateKey Public crypto.PublicKey }
ECDSA provides capabilities around marshaling a ECDSA key pair for the Coral Project's Talk.
func NewECDSA ¶
NewECDSA will generate a ECDSA key using the crypto/rand.Reader source with a length of bitSize.
func (ECDSA) MarshalJSON ¶
MarshalJSON implements the MarshalJSON interface.
type RSA ¶
type RSA struct { Private *rsa.PrivateKey Public crypto.PublicKey }
RSA provides capabilities around marshaling a RSA key pair for the Coral Project's Talk.
func NewRSA ¶
NewRSA will generate a RSA key using the crypto/rand.Reader source with a length of bitSize.
func (RSA) MarshalJSON ¶
MarshalJSON implements the MarshalJSON interface.