Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Ed25519KeyGenerator ¶
type Ed25519KeyGenerator struct {
// contains filtered or unexported fields
}
func NewKeyGenerator ¶
func NewKeyGenerator(privateKeyPath, publicKeyPath string) (*Ed25519KeyGenerator, error)
func (Ed25519KeyGenerator) Generate ¶
func (r Ed25519KeyGenerator) Generate() error
type KeyGenerator ¶
type KeyGenerator interface {
Generate() error
}
type RequestSigner ¶
type RequestSigner struct {
// contains filtered or unexported fields
}
func (RequestSigner) SignString ¶
func (r RequestSigner) SignString(payload []byte, timestamp uint64) string
type RequestVerifier ¶
type RequestVerifier struct {
// contains filtered or unexported fields
}
func NewVerifier ¶
func NewVerifier(keys fs.FS) (*RequestVerifier, error)
func (RequestVerifier) Verify ¶
func (r RequestVerifier) Verify(timestamp uint64, payload []byte, signature []byte) error
func (RequestVerifier) VerifyStringSignature ¶
func (r RequestVerifier) VerifyStringSignature(timestamp uint64, payload []byte, signature string) error
Click to show internal directories.
Click to hide internal directories.