Skip to content

Commit a94e031

Browse files
committed
Fix typos
Found via `typos --hidden --format brief`
1 parent 8419b9e commit a94e031

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ and [Argon2id](https://en.wikipedia.org/wiki/Argon2) for key derivation.
6161
It also uses [AES-GCM](https://docs.rs/aes-gcm/latest/aes_gcm/) to import from encrypted Aegis backups.
6262

6363

64-
## Cross Plaform
64+
## Cross Platform
6565

6666
cotp should be easily compiled on the most used platforms, but it is mostly tested on Linux, Windows and macOS.
6767

src/interface/handlers/main_window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fn handle_counter_switch(app: &mut App, increment: bool) {
126126
if let Some(selected) = app.table.state.selected() {
127127
if let Some(element) = app.database.mut_element(selected) {
128128
if element.type_ == OTPType::Hotp {
129-
// safe to unwrap becouse the element type is HOTP
129+
// safe to unwrap because the element type is HOTP
130130
let counter = element.counter.unwrap();
131131
element.counter = if increment {
132132
Some(counter.checked_add(1).unwrap_or(u64::MAX))

src/otp/algorithms/yandex_otp_maker.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use crate::otp::otp_error::OtpError;
2121
use super::hotp_maker::hotp_hash;
2222

2323
const EN_ALPHABET_LENGTH: u64 = 26;
24-
const SECRET_LENGHT: usize = 16;
24+
const SECRET_LENGTH: usize = 16;
2525

2626
pub fn yandex(
2727
secret: &str,
@@ -70,13 +70,13 @@ where
7070
Err(e) => return Err(OtpError::SecretEncoding(e.kind, e.position)),
7171
};
7272

73-
if decoded_secret.len() < SECRET_LENGHT {
73+
if decoded_secret.len() < SECRET_LENGTH {
7474
return Err(OtpError::ShortSecret);
7575
}
7676

77-
let parsed_secret = &decoded_secret.as_slice()[0..SECRET_LENGHT];
77+
let parsed_secret = &decoded_secret.as_slice()[0..SECRET_LENGTH];
7878

79-
let mut pin_with_secret: Vec<u8> = Vec::with_capacity(pin.len() + SECRET_LENGHT);
79+
let mut pin_with_secret: Vec<u8> = Vec::with_capacity(pin.len() + SECRET_LENGTH);
8080

8181
pin_with_secret.append(&mut pin.as_bytes().to_vec());
8282
pin_with_secret.append(&mut parsed_secret.to_vec());

0 commit comments

Comments
 (0)