Versions in this module Expand all Collapse all v0 v0.8.8 Aug 8, 2017 Changes in this version + const HashSize + const SignatureSize + var N = S256().Params().N + func AesCTRXOR(key, inText, iv []byte) ([]byte, error) + func AesDecrypt(crypted, key []byte) ([]byte, error) + func AesEncrypt(origData, key []byte) ([]byte, error) + func Ecrecover(hash, sig []byte) ([]byte, error) + func Keccak256(data ...[]byte) []byte + func PKCS5Padding(ciphertext []byte, blockSize int) []byte + func PKCS5UnPadding(origData []byte) []byte + func Ripemd160(data []byte) []byte + func S256() elliptic.Curve + func ZeroKey(k *PrivateKey) + type Hash [HashSize]byte + func CalcHash(a, b Hash) Hash + func ComputeMerkleHash(data []Hash) []Hash + func DoubleSha256(data []byte) Hash + func GetMerkleHash(data []Hash) Hash + func HexToHash(s string) Hash + func NewHash(data []byte) Hash + func Sha256(data []byte) Hash + func (h *Hash) Reverse() Hash + func (h *Hash) SetBytes(b []byte) + func (h *Hash) SetString(s string) + func (h *Hash) UnmarshalText(input []byte) error + func (h Hash) Bytes() []byte + func (h Hash) Equal(h1 Hash) bool + func (h Hash) MarshalText() ([]byte, error) + func (h Hash) PrefixLen() int + func (h Hash) String() string + func (h Hash) Xor(h1 Hash) Hash + type PrivateKey ecdsa.PrivateKey + func GenerateKey() (*PrivateKey, error) + func HexToECDSA(hexkey string) (*PrivateKey, error) + func LoadECDSA(file string) (*PrivateKey, error) + func ToECDSA(prv []byte) *PrivateKey + func (priv *PrivateKey) Public() *PublicKey + func (priv *PrivateKey) SaveECDSA(file string) error + func (priv *PrivateKey) SecretBytes() []byte + func (priv *PrivateKey) Sign(hash []byte) (sig *Signature, err error) + type PublicKey ecdsa.PublicKey + func SigToPub(hash, sig []byte) (*PublicKey, error) + func ToECDSAPub(pub []byte) *PublicKey + func (pub *PublicKey) Bytes() []byte + type Signature [SignatureSize]byte + func (sig *Signature) Bytes() []byte + func (sig *Signature) Ecrecover(hash []byte) ([]byte, error) + func (sig *Signature) RecoverPublicKey(hash []byte) (*PublicKey, error) + func (sig *Signature) SetBytes(data []byte, compressed bool) + func (sig *Signature) UnmarshalText(input []byte) error + func (sig *Signature) VRS() (v byte, r, s *big.Int) + func (sig *Signature) Validate() bool + func (sig *Signature) Verify(hash []byte, pub *PublicKey) bool + func (sig Signature) MarshalText() ([]byte, error)