diff options
| author | ebiggers <ebiggers@google.com> | 2019-09-08 19:46:59 -0700 |
|---|---|---|
| committer | Joseph Richey <joerichey@google.com> | 2019-09-08 19:46:59 -0700 |
| commit | 6445dad7d66fa6a1867090fcd9602c98863649f6 (patch) | |
| tree | c0e5209f018a50ee8b0a1277cc7b06266eff18c1 /crypto/key.go | |
| parent | 28b29d1c97ffd97671186b5e1fae37b64424f9ee (diff) | |
Fix various typos and grammatical errors (#141)
These were found by a combination of manual review and a custom script
that checks for common errors.
Also removed an outdated sentence from the comment for setupBefore().
Diffstat (limited to 'crypto/key.go')
| -rw-r--r-- | crypto/key.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/key.go b/crypto/key.go index 027d46d..7059073 100644 --- a/crypto/key.go +++ b/crypto/key.go @@ -100,7 +100,7 @@ func newBlankKey(length int) (*Key, error) { if length == 0 { return &Key{data: nil}, nil } else if length < 0 { - return nil, errors.Wrapf(ErrNegitiveLength, "length of %d requested", length) + return nil, errors.Wrapf(ErrNegativeLength, "length of %d requested", length) } flags := keyMmapFlags @@ -198,7 +198,7 @@ func NewKeyFromCString(str unsafe.Pointer) (*Key, error) { return key, nil } -// NewKeyFromReader constructs a key of abritary length by reading from reader +// NewKeyFromReader constructs a key of arbitrary length by reading from reader // until hitting EOF. func NewKeyFromReader(reader io.Reader) (*Key, error) { // Use an initial key size of a page. As Mmap allocates a page anyway, @@ -312,7 +312,7 @@ func WriteRecoveryCode(key *Key, writer io.Writer) error { return w.Err() } -// ReadRecoveryCode gets the recovery code from the provided writer and returns +// ReadRecoveryCode gets the recovery code from the provided reader and returns // the corresponding cryptographic key. // WARNING: This recovery key is enough to derive the original key, so it must // be given the same level of protection as a raw cryptographic key. |