all: fix some comments
Change-Id: I11030ee466c8cac6855ce4fe2cf72e0b8d7029f8
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/463796
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
diff --git a/acme/rfc8555.go b/acme/rfc8555.go
index ee24dfd..3152e53 100644
--- a/acme/rfc8555.go
+++ b/acme/rfc8555.go
@@ -117,7 +117,7 @@
return responseAccount(res)
}
-// getGegRFC is equivalent to c.GetReg but for CAs implementing RFC 8555.
+// getRegRFC is equivalent to c.GetReg but for CAs implementing RFC 8555.
// It expects c.Discover to have already been called.
func (c *Client) getRegRFC(ctx context.Context) (*Account, error) {
req := json.RawMessage(`{"onlyReturnExisting": true}`)
diff --git a/cryptobyte/asn1.go b/cryptobyte/asn1.go
index 401414d..3141a7f 100644
--- a/cryptobyte/asn1.go
+++ b/cryptobyte/asn1.go
@@ -559,7 +559,7 @@
return true
}
-// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. It is
+// ReadASN1BitStringAsBytes decodes an ASN.1 BIT STRING into out and advances. It is
// an error if the BIT STRING is not a whole number of bytes. It reports
// whether the read was successful.
func (s *String) ReadASN1BitStringAsBytes(out *[]byte) bool {
diff --git a/curve25519/internal/field/fe_generic.go b/curve25519/internal/field/fe_generic.go
index 7b5b78c..2671217 100644
--- a/curve25519/internal/field/fe_generic.go
+++ b/curve25519/internal/field/fe_generic.go
@@ -245,7 +245,7 @@
v.carryPropagate()
}
-// carryPropagate brings the limbs below 52 bits by applying the reduction
+// carryPropagateGeneric brings the limbs below 52 bits by applying the reduction
// identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry. TODO inline
func (v *Element) carryPropagateGeneric() *Element {
c0 := v.l0 >> 51
diff --git a/openpgp/keys.go b/openpgp/keys.go
index faa2fb3..d62f787 100644
--- a/openpgp/keys.go
+++ b/openpgp/keys.go
@@ -61,7 +61,7 @@
type KeyRing interface {
// KeysById returns the set of keys that have the given key id.
KeysById(id uint64) []Key
- // KeysByIdAndUsage returns the set of keys with the given id
+ // KeysByIdUsage returns the set of keys with the given id
// that also meet the key usage given by requiredUsage.
// The requiredUsage is expressed as the bitwise-OR of
// packet.KeyFlag* values.
@@ -183,7 +183,7 @@
return
}
-// KeysByIdAndUsage returns the set of keys with the given id that also meet
+// KeysByIdUsage returns the set of keys with the given id that also meet
// the key usage given by requiredUsage. The requiredUsage is expressed as
// the bitwise-OR of packet.KeyFlag* values.
func (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) {
diff --git a/ssh/knownhosts/knownhosts.go b/ssh/knownhosts/knownhosts.go
index 260cfe5..7376a8d 100644
--- a/ssh/knownhosts/knownhosts.go
+++ b/ssh/knownhosts/knownhosts.go
@@ -142,7 +142,7 @@
return bytes.Equal(a.Marshal(), b.Marshal())
}
-// IsAuthorityForHost can be used as a callback in ssh.CertChecker
+// IsHostAuthority can be used as a callback in ssh.CertChecker
func (db *hostKeyDB) IsHostAuthority(remote ssh.PublicKey, address string) bool {
h, p, err := net.SplitHostPort(address)
if err != nil {