Versions in this module Expand all Collapse all v1 v1.1.0 Aug 5, 2018 Changes in this version + var PrivateKeySizeErr = errors.New("private key length does not equal expected key length") type SignaturePolicy + GenerateKeys func() ([]byte, []byte, error) + RandomKeyPair func() *KeyPair v1.0.0 Jul 9, 2018 Changes in this version + func Hash(hp HashPolicy, s *big.Int) *big.Int + func Verify(sp SignaturePolicy, hp HashPolicy, publicKey []byte, message []byte, ...) bool + type HashPolicy interface + HashBytes func(b []byte) []byte + type KeyPair struct + PrivateKey []byte + PublicKey []byte + func FromPrivateKey(p SignaturePolicy, privateKey string) (*KeyPair, error) + func FromPrivateKeyBytes(p SignaturePolicy, rawPrivateKey []byte) (*KeyPair, error) + func (k *KeyPair) PrivateKeyHex() string + func (k *KeyPair) PublicKeyHex() string + func (k *KeyPair) Sign(sp SignaturePolicy, hp HashPolicy, message []byte) ([]byte, error) + func (k *KeyPair) String() string + type SignaturePolicy interface + PrivateKeySize func() int + PrivateToPublic func(privateKey []byte) ([]byte, error) + PublicKeySize func() int + Sign func(privateKey []byte, message []byte) []byte + Verify func(publicKey []byte, message []byte, signature []byte) bool