Versions in this module Expand all Collapse all v0 v0.1.0 Mar 27, 2015 Changes in this version + const MinPasswordLen + func Decrypt(payload []byte, key *Key) (out []byte, err error) + func Encrypt(payload []byte, key *Key, pubkey *Key) (out []byte, err error) + func NewMAC(key []byte, url string, msg []byte) string + func PasswordVerify(pass, hash Binary) (ok bool, err error) + func RandomInt() (int64, error) + func TLSCertKeyPair(cert *TLSCert, key *TLSKey) (tlsCert []tls.Certificate) + func VerifyMAC(key []byte, msgMac string, url string, msg []byte) (ok bool) + func Zero(in Binary) + type Binary []byte + func NewBinary(in []byte) *Binary + func NewPassword() (pass Binary, err error) + func PasswordHash(pass Binary) (hash Binary, err error) + func (b *Binary) Compare(data Binary) bool + func (b *Binary) Decode(data []byte) error + func (b *Binary) DecodeString(data string) error + func (b *Binary) Encode() ([]byte, error) + func (b *Binary) EncodeString() (string, error) + type CertPool struct + CA *x509.CertPool + func (c *CertPool) Decode(data []byte) (err error) + func (c *CertPool) Encode() (data []byte, err error) + func (c *CertPool) New(certs ...*TLSCert) + type Key struct + Priv *[32]byte + Pub *[32]byte + func (k *Key) Decode(data []byte) (err error) + func (k *Key) Encode() (data []byte, err error) + func (k *Key) Generate() (err error) + func (k *Key) Zero() + type TLSCert struct + func (t *TLSCert) Decode(data []byte) (err error) + func (t *TLSCert) Encode() (data []byte, err error) + func (t *TLSCert) Generate(name string, isCa bool, years int, pubKey TLSPubKey, privKey *TLSKey, ...) (err error) + type TLSKey struct + func (t *TLSKey) Decode(data []byte) (err error) + func (t *TLSKey) Encode() (data []byte, err error) + func (t *TLSKey) Generate() (err error) + func (t *TLSKey) Public() TLSPubKey + type TLSPubKey struct