Skip to content

Commit b168f70

Browse files
authored
Merge pull request #75 from rex4539/typos
Fix typos
2 parents 9b938e0 + 4b07e88 commit b168f70

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/crypto/keys.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl PrivateKey {
6363
PrivateKey(self.0)
6464
}
6565

66-
// honestly, this method shouldn't really be exist, but right now we have no decent
66+
// honestly, this method shouldn't really exist, but right now we have no decent
6767
// rng propagation in the library
6868
pub fn new() -> Self {
6969
let mut rng = OsRng;

src/packet/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl<'a> SphinxPacketBuilder<'a> {
4040
None => SphinxHeader::new(&EphemeralSecret::new(), route, delays, destination),
4141
};
4242

43-
// no need to check for if plaintext has correct length as this check is already performed in payload encapsulation
43+
// no need to check if plaintext has correct length as this check is already performed in payload encapsulation
4444
let payload = Payload::encapsulate_message(&message, &payload_keys, self.payload_size)?;
4545
Ok(SphinxPacket { header, payload })
4646
}

src/payload/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl Payload {
8585
Ok(())
8686
}
8787

88-
/// Attaches leading and trailing paddings of correct lenghts to the provided plaintext message.
88+
/// Attaches leading and trailing paddings of correct lengths to the provided plaintext message.
8989
/// Note: this function should only ever be called in [`encapsulate_message`] after
9090
/// [`validate_parameters`] was performed.
9191
fn set_final_payload(plaintext_message: &[u8], payload_size: usize) -> Self {
@@ -256,8 +256,8 @@ mod final_payload_setting {
256256

257257
#[test]
258258
fn adds_correct_padding() {
259-
let plaintext_lenghts = vec![0, 1, 16, 128, 4096];
260-
for plaintext_length in plaintext_lenghts {
259+
let plaintext_lengths = vec![0, 1, 16, 128, 4096];
260+
for plaintext_length in plaintext_lengths {
261261
// ensure payload always has correct length, because we're not testing for that
262262
let payload_size = plaintext_length + lioness::DIGEST_RESULT_SIZE;
263263
let final_payload =

0 commit comments

Comments
 (0)