Documentation ¶ Index ¶ func Sign(priv *ecdsa.PrivateKey, msg []byte) ([]byte, error) func Verify(pub *ecdsa.PublicKey, sig, msg []byte) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Sign ¶ func Sign(priv *ecdsa.PrivateKey, msg []byte) ([]byte, error) Sign calculates the signature of msg using ECDSA. The opts argument may be nil, in which case sensible defaults are used. Warning, msg will be hashed with SHA-256. It returns asn1.encode(r.Bytes(), s.Bytes()). func Verify ¶ func Verify(pub *ecdsa.PublicKey, sig, msg []byte) error Verify verifies the signature sig of msg using the public key pub. A valid signature is indicated by returning a nil error. Types ¶ This section is empty. Source Files ¶ View all Source files ecdsa.go Click to show internal directories. Click to hide internal directories.