aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2015-03-25 20:20:04 +0100
committerGibheer <gibheer@gmail.com>2015-03-25 20:20:04 +0100
commitafbc2e0dbf3152c5d3baf201ec23279928519ec1 (patch)
treed2c9d46348f3d3ec8482427dfc4e10dddf163257
parent11423e25b5db9e6345bf5df6a3a53289ab44ca3b (diff)
refine documentation after report of golint
-rw-r--r--types.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/types.go b/types.go
index 08c42d8..5feb2b1 100644
--- a/types.go
+++ b/types.go
@@ -23,7 +23,8 @@ import (
const PemLabelPublic = "PUBLIC KEY"
type (
- // This is the common interface for all private keys.
+ // PrivateKey is a common interface for all crypto implementations to provide
+ // the same functions, like deriving a public key or signing a message.
PrivateKey interface {
// Derive a new public key from the private key.
Public() PublicKey
@@ -36,7 +37,8 @@ type (
PrivateKey() crypto.PrivateKey
}
- // This interface has to be implemented by every public key structure.
+ // PublicKey is used by the different crypto implementations to provide the
+ // same functionality like verifying a message against a signature.
PublicKey interface {
Pemmer
// This function can be used to verify a message against a provided signature
@@ -44,7 +46,7 @@ type (
Verify(message []byte, signature []byte, hash crypto.Hash) (bool, error)
}
- // This interface is used by all crypto structures which need to be available
+ // Pemmer is used by all crypto structures which need to be available
// in the pem format. The result can then be written to any structure
// implementing the io.Writer interface.
Pemmer interface {