Documentation ¶
Overview ¶
Package crypto provides helpers for handling cryptographic keys and signing triples.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrivateKey ¶
type PrivateKey ecdsa.PrivateKey
func GenerateKey ¶
func GenerateKey() (*PrivateKey, error)
func ReadKey ¶
func ReadKey(path string) (*PrivateKey, error)
func ReadOrGenerateKey ¶
func ReadOrGenerateKey(path string) (*PrivateKey, error)
func (*PrivateKey) AuthorID ¶
func (key *PrivateKey) AuthorID() (string, error)
AuthorID generates a unique ID based on the murmur hash of the public key.
func (*PrivateKey) SignTriple ¶
func (key *PrivateKey) SignTriple(t *protocol.Triple) error
func (*PrivateKey) Write ¶
func (key *PrivateKey) Write(path string) error
Click to show internal directories.
Click to hide internal directories.