Documentation ¶
Index ¶
- func ListAlgo() []string
- func RegisterSigAlgo(algo SigningAlgo[any, any, any])
- func TestAlgo(algo SigningAlgo[any, any, any]) error
- type HashedPublicKey
- type PublicKey
- type SecretKey
- func (sk *SecretKey) Algo() string
- func (sk *SecretKey) MarshalText() ([]byte, error)
- func (sk *SecretKey) PublicKey() *PublicKey
- func (sk *SecretKey) Sign(msg []byte) *Signature
- func (sk *SecretKey) UnmarshalText(b []byte) error
- func (sk *SecretKey) UnsafeUnmarshalText() ([]byte, error)
- func (sk *SecretKey) Unwrap() any
- type Signature
- type SigningAlgo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSigAlgo ¶
func RegisterSigAlgo(algo SigningAlgo[any, any, any])
Types ¶
type HashedPublicKey ¶ added in v1.2.0
type HashedPublicKey struct {
// contains filtered or unexported fields
}
func (*HashedPublicKey) Equal ¶ added in v1.2.0
func (p *HashedPublicKey) Equal(publicKey *PublicKey) bool
func (*HashedPublicKey) MarshalText ¶ added in v1.7.0
func (p *HashedPublicKey) MarshalText() (text []byte, err error)
func (*HashedPublicKey) UnmarshalText ¶ added in v1.7.0
func (p *HashedPublicKey) UnmarshalText(text []byte) error
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func (*PublicKey) Fork ¶ added in v1.2.0
func (pk *PublicKey) Fork() *HashedPublicKey
func (*PublicKey) MarshalText ¶ added in v1.7.0
func (*PublicKey) UnmarshalText ¶ added in v1.7.0
type SecretKey ¶
type SecretKey struct {
// contains filtered or unexported fields
}
func GenerateSecretKey ¶ added in v1.3.0
func (*SecretKey) MarshalText ¶ added in v1.7.0
func (*SecretKey) UnmarshalText ¶ added in v1.7.0
func (*SecretKey) UnsafeUnmarshalText ¶ added in v1.7.0
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
func (*Signature) MarshalText ¶ added in v1.7.0
func (*Signature) UnmarshalText ¶ added in v1.7.0
type SigningAlgo ¶
type SigningAlgo[S, P, Sig any] interface { Algo() string UnmarshalBinarySecretKey([]byte) (S, error) UnmarshalBinaryPublicKey([]byte) (P, error) UnmarshalBinarySignature([]byte) (Sig, error) MarshalBinarySecretKey(S) []byte MarshalBinaryPublicKey(P) []byte MarshalBinarySignature(Sig) []byte Sign(S, []byte) Sig Derive(S) P New() S Verify(Sig, P, []byte) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.