Documentation ¶
Index ¶
- Constants
- func GenerateID(hexEncodedPrv string) (string, error)
- func RecoverPublicKey(hash *Hash, sig []byte) ([]byte, error)
- func RecoveredID(hash *Hash, sig []byte) (string, error)
- func Sign(hash *Hash, prv *ecdsa.PrivateKey) ([]byte, error)
- func Verify(pubkey []byte, hash *Hash, sig []byte) (bool, error)
- type Hash
- type Idendity
Constants ¶
View Source
const RecoveryIDOffset = 64
View Source
const SignatureLength = 64 + 1
Variables ¶
This section is empty.
Functions ¶
func GenerateID ¶ added in v1.7.0
Types ¶
type Hash ¶
type Hash struct {
// contains filtered or unexported fields
}
func CreateHashFromString ¶
func GenerateHash ¶
func GenerateHashFromString ¶
type Idendity ¶
type Idendity struct {
// contains filtered or unexported fields
}
func CreateIdendity ¶
func (*Idendity) PrivateKey ¶
func (idendity *Idendity) PrivateKey() *ecdsa.PrivateKey
func (*Idendity) PrivateKeyAsHex ¶
func (*Idendity) PublicKeyAsHex ¶
Click to show internal directories.
Click to hide internal directories.