Documentation
¶
Overview ¶
Package crypto provides crypto algos
Index ¶
Constants ¶
View Source
const HashLength = 32
HashLength length of hash in bytes
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hash ¶
type Hash [HashLength]byte
Hash hash type
func (*Hash) UnmarshalJSON ¶
UnmarshalJSON unmarshal JSON
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
Identity wrap ECDSA private key to identify some one.
func GenerateIdentity ¶
GenerateIdentity generate a new identity
func NewIdentity ¶
NewIdentity create identity from private key.
func (*Identity) ID ¶
ID returns ID of identity in string. The ID is derived from public key, and the result is cached.
func (*Identity) PrivateKey ¶
PrivateKey returns private key in bytes.
Click to show internal directories.
Click to hide internal directories.