Skip to content

Commit

Permalink
docs: add comments to interface
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Dec 4, 2023
1 parent 5c12139 commit f1d5318
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/coreiface/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ type KeyAPI interface {
// Remove removes keys from keystore. Returns ipns path of the removed key
Remove(ctx context.Context, name string) (Key, error)

// Sign signs the given data with the key named name. Returns the key used
// for signing, the signature, and an error.
Sign(ctx context.Context, name string, data []byte) (Key, []byte, error)

// Verify verifies if the given data and signatures match. Returns the key used
// for verification, whether signature and data match, and an error.
Verify(ctx context.Context, keyOrName string, signature, data []byte) (Key, bool, error)
}

0 comments on commit f1d5318

Please sign in to comment.