Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hash ¶
type Hash [32]byte
Hash is the result of Keccak256
type Signatories ¶
type Signatories []Signatory
Signatories is an array of Signatory
func (Signatories) Equal ¶
func (sig Signatories) Equal(other Signatories) bool
Equal checks for set equality of Signatories, order does not matter
type Signatory ¶
type Signatory [20]byte
Signatory is the last 20 bytes of a Public Key
type Signature ¶
type Signature [65]byte
Signature produced by `Sign`
type Signatures ¶
type Signatures []Signature
Signatures is an array of Signature
func (Signatures) Equal ¶
func (sigs Signatures) Equal(other Signatures) bool
Equal checks for set equality of Signatures, order does not matter
type Signer ¶
type Signer interface {
// Sign a `Hash` and return the resulting `Signature`.
Sign(hash Hash) (Signature, error)
// Signatory returns the `Signatory` of your PublicKey
Signatory() Signatory
}
Signer signs the provided hash, returning a signature
type SignerVerifier ¶
A SignerVerifier combines the `Signer` and `Verifier` interfaces.
type Verifier ¶
type Verifier interface {
// Note: Verify will not return an error if the hash and signature
// do not match, but the returned public key is effectively random.
Verify(hash Hash, signature Signature) (Signatory, error)
}
A Verifier can return the `Signatory` that produced a `Signature`.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ecdsa provides Sign and Verify capabilities using ECDSA I picked ethereum-go's implementation of ECDSA instead of the built in go libraries since it provides both build in marshaling/unmarshaling for the signature and a way to recover the Public Key from the signature.
|
Package ecdsa provides Sign and Verify capabilities using ECDSA I picked ethereum-go's implementation of ECDSA instead of the built in go libraries since it provides both build in marshaling/unmarshaling for the signature and a way to recover the Public Key from the signature. |
Click to show internal directories.
Click to hide internal directories.