Documentation
¶
Index ¶
- func DecodeSignature(sig string) (r, s *big.Int, err error)
- func EncodeSignature(r, s *big.Int) string
- func FromECDSAPub(pub *ecdsa.PublicKey) []byte
- func GenerateECDSAKey() (*ecdsa.PrivateKey, error)
- func SHA256(hashBytes []byte) []byte
- func Sign(priv *ecdsa.PrivateKey, hash []byte) (r, s *big.Int, err error)
- func SimpleHashFromHashes(hashes [][]byte) []byte
- func SimpleHashFromTwoHashes(left []byte, right []byte) []byte
- func ToECDSAPub(pub []byte) *ecdsa.PublicKey
- func Verify(pub *ecdsa.PublicKey, hash []byte, r, s *big.Int) bool
- type PemDump
- type PemKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeSignature ¶
func FromECDSAPub ¶
func GenerateECDSAKey ¶
func GenerateECDSAKey() (*ecdsa.PrivateKey, error)
func SimpleHashFromHashes ¶
func SimpleHashFromTwoHashes ¶
func ToECDSAPub ¶
Types ¶
type PemDump ¶
func GeneratePemKey ¶
type PemKey ¶
type PemKey struct {
// contains filtered or unexported fields
}
func (*PemKey) ReadKeyFromBuf ¶
func (k *PemKey) ReadKeyFromBuf(buf []byte) (*ecdsa.PrivateKey, error)
Click to show internal directories.
Click to hide internal directories.