keyid

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HashNotAvailable = errors.New("Package implementing hash is not imported")
)

Functions

This section is empty.

Types

type KeyId

type KeyId []byte

A calculated hash. The custom type is mostly for the custom Stringer function, which returns an hex encoded string similar to other hash tools.

func CertKeyId

func CertKeyId(cert *x509.Certificate, h crypto.Hash) (KeyId, error)

Calculate the keyid from the public key stored in the certificate.

This is not necessarily the same as the subjectKeyId stored in the certificate, which could have been generated using any method.

func (KeyId) Bytes

func (k KeyId) Bytes() []byte

Returns k type converted to []byte.

func (KeyId) ColonString

func (k KeyId) ColonString() string

Returns a hex encoded string of the keyid, with colons inserted between each byte.

func (KeyId) String

func (k KeyId) String() string

Returns a hex encoded string of the keyid.

Jump to

Keyboard shortcuts

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