Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chacha20_poly1305_openssh: Rename confusing variable (NFC). #2231

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/aead/chacha20_poly1305_openssh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,11 @@ impl OpeningKey {
verify(poly_key, ciphertext_in_plaintext_out, tag)?;

// Won't panic because the length was checked above.
let plaintext_in_ciphertext_out = &mut ciphertext_in_plaintext_out[PACKET_LENGTH_LEN..];
let after_packet_length = &mut ciphertext_in_plaintext_out[PACKET_LENGTH_LEN..];

self.key
.k_2
.encrypt_in_place(counter, plaintext_in_ciphertext_out);
self.key.k_2.encrypt_in_place(counter, after_packet_length);

Ok(plaintext_in_ciphertext_out)
Ok(after_packet_length)
}
}

Expand Down