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

Commit

Permalink
Typo fixes for doc_test.go and cbc_hmac.go
Browse files Browse the repository at this point in the history
  • Loading branch information
adeinega committed Mar 21, 2021
1 parent 5c87222 commit 92d2031
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cipher/cbc_hmac.go
Expand Up @@ -150,7 +150,7 @@ func (ctx *cbcAEAD) computeAuthTag(aad, nonce, ciphertext []byte) []byte {
return hmac.Sum(nil)[:ctx.authtagBytes]
}

// resize ensures the the given slice has a capacity of at least n bytes.
// resize ensures that the given slice has a capacity of at least n bytes.
// If the capacity of the slice is less than n, a new slice is allocated
// and the existing data will be copied.
func resize(in []byte, n uint64) (head, tail []byte) {
Expand Down
4 changes: 2 additions & 2 deletions doc_test.go
Expand Up @@ -63,7 +63,7 @@ func Example_jWE() {
}

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

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

0 comments on commit 92d2031

Please sign in to comment.