diff options
| author | cui fliter <imcusg@gmail.com> | 2023-01-29 13:44:14 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-01-30 18:50:24 +0000 |
| commit | 59ff47295ca89b9497fc7964d4777b2a9edd1e22 (patch) | |
| tree | f5beb0702b6925ed47f996fa3730d5c64971fab5 | |
| parent | 3d872d042823aed41f28af3b13beb27c0c9b1e35 (diff) | |
| download | go-x-crypto-59ff47295ca89b9497fc7964d4777b2a9edd1e22.tar.xz | |
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>
| -rw-r--r-- | acme/rfc8555.go | 2 | ||||
| -rw-r--r-- | cryptobyte/asn1.go | 2 | ||||
| -rw-r--r-- | curve25519/internal/field/fe_generic.go | 2 | ||||
| -rw-r--r-- | openpgp/keys.go | 4 | ||||
| -rw-r--r-- | ssh/knownhosts/knownhosts.go | 2 |
5 files changed, 6 insertions, 6 deletions
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 @@ func (c *Client) updateRegRFC(ctx context.Context, a *Account) (*Account, error) 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 @@ func (s *String) ReadASN1BitString(out *encoding_asn1.BitString) bool { 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 @@ func feSquareGeneric(v, a *Element) { 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 Key struct { 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 @@ func (el EntityList) KeysById(id uint64) (keys []Key) { 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 @@ func keyEq(a, b ssh.PublicKey) bool { 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 { |
