Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit 5503409

Browse files
authored
Merge pull request #347 from adeinega/typos
Typo fixes for doc_test.go, cbc_hmac.go and other places
2 parents 5c87222 + 2726092 commit 5503409

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

cipher/cbc_hmac.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (ctx *cbcAEAD) computeAuthTag(aad, nonce, ciphertext []byte) []byte {
150150
return hmac.Sum(nil)[:ctx.authtagBytes]
151151
}
152152

153-
// resize ensures the the given slice has a capacity of at least n bytes.
153+
// resize ensures that the given slice has a capacity of at least n bytes.
154154
// If the capacity of the slice is less than n, a new slice is allocated
155155
// and the existing data will be copied.
156156
func resize(in []byte, n uint64) (head, tail []byte) {

doc_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func Example_jWE() {
6363
}
6464

6565
// Now we can decrypt and get back our original plaintext. An error here
66-
// would indicate the the message failed to decrypt, e.g. because the auth
66+
// would indicate that the message failed to decrypt, e.g. because the auth
6767
// tag was broken or the message was tampered with.
6868
decrypted, err := object.Decrypt(privateKey)
6969
if err != nil {
@@ -109,7 +109,7 @@ func Example_jWS() {
109109
}
110110

111111
// Now we can verify the signature on the payload. An error here would
112-
// indicate the the message failed to verify, e.g. because the signature was
112+
// indicate that the message failed to verify, e.g. because the signature was
113113
// broken or the message was tampered with.
114114
output, err := object.Verify(&privateKey.PublicKey)
115115
if err != nil {

jose-util/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ signature algorithm (e.g. `PS256`).
1717

1818
Input and output files can be specified via the `--in` and `--out` flags.
1919
Either flag can be omitted, in which case `jose-util` uses stdin/stdout for
20-
input/output respectively. By default each command will output a compact
20+
input/output respectively. By default, each command will output a compact
2121
message, but it's possible to get the full serialization by supplying the
2222
`--full` flag.
2323

jwk-keygen/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
var (
3838
app = kingpin.New("jwk-keygen", "A command-line utility to generate public/pirvate keypairs in JWK format.")
3939

40-
use = app.Flag("use", "Desrired key use").Required().Enum("enc", "sig")
40+
use = app.Flag("use", "Desired key use").Required().Enum("enc", "sig")
4141
alg = app.Flag("alg", "Generate key to be used for ALG").Required().Enum(
4242
// `sig`
4343
string(jose.ES256), string(jose.ES384), string(jose.ES512), string(jose.EdDSA),

jwk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (k *JSONWebKey) UnmarshalJSON(data []byte) (err error) {
238238

239239
if certPub != nil && keyPub != nil {
240240
if !reflect.DeepEqual(certPub, keyPub) {
241-
return errors.New("square/go-jose: invalid JWK, public keys in key and x5c fields to not match")
241+
return errors.New("square/go-jose: invalid JWK, public keys in key and x5c fields do not match")
242242
}
243243
}
244244

shared.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ type Header struct {
183183
// Unverified certificate chain parsed from x5c header.
184184
certificates []*x509.Certificate
185185

186-
// Any headers not recognised above get unmarshaled
186+
// Any headers not recognised above get unmarshalled
187187
// from JSON in a generic manner and placed in this map.
188188
ExtraHeaders map[HeaderKey]interface{}
189189
}
@@ -295,12 +295,12 @@ func (parsed rawHeader) getAPV() (*byteBuffer, error) {
295295
return parsed.getByteBuffer(headerAPV)
296296
}
297297

298-
// getIV extracts parsed "iv" frpom the raw JSON.
298+
// getIV extracts parsed "iv" from the raw JSON.
299299
func (parsed rawHeader) getIV() (*byteBuffer, error) {
300300
return parsed.getByteBuffer(headerIV)
301301
}
302302

303-
// getTag extracts parsed "tag" frpom the raw JSON.
303+
// getTag extracts parsed "tag" from the raw JSON.
304304
func (parsed rawHeader) getTag() (*byteBuffer, error) {
305305
return parsed.getByteBuffer(headerTag)
306306
}

0 commit comments

Comments
 (0)