crypto

package
v0.0.0-...-a69b080 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2016 License: MIT Imports: 10 Imported by: 0

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

func FingerprintTriple

func FingerprintTriple(t *protocol.Triple) ([]byte, error)

FingerprintTriple generates a SHA-1 hash of the triple.

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

Jump to

Keyboard shortcuts

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