package logid
import "github.com/google/certificate-transparency-go/logid"
Package logid provides a type and accompanying helpers for manipulating log IDs.
Index ¶
Types ¶
type LogID ¶
LogID is a unique identifier for a CT Log derived from its public key as described by RFC6962 sect. 3.2. Since it is derived from a SHA-256 hash, its length is fixed at 32 bytes.
func FromB64 ¶
FromB64 returns a LogID from parsing the supplied base64-encoded Log ID.
func FromB64OrDie ¶
FromB64OrDie returns a LogID from parsing supplied base64-encoded data that we assert is already well-formed, so it 'cannot fail'.
func FromBytes ¶
FromBytes returns a LogID copied from the supplied byte slice.
func FromPubKeyB64 ¶
FromPubKeyB64 takes a base64 encoded DER public key, and converts it into a LogID, as defined in RFC6962 - i.e. the SHA-256 hash of the base64 decoded bytes of the log's public key.
func FromPubKeyB64OrDie ¶
FromPubKeyB64OrDie takes a base64 encoded DER public key, and converts it into a LogID, as defined in RFC6962 - i.e. the sha256 hash of the base64 decoded bytes of the log's public key. This is for data that we assert is already well-formed, so it 'cannot fail'.
func (LogID) Bytes ¶
Bytes returns the raw bytes of the LogID, as a slice.
func (LogID) String ¶
String base64-encodes a LogID for ease of debugging.
Source Files ¶
- Version
- v1.3.1 (latest)
- Published
- Jan 15, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 4 days ago –
Tools for package owners.