Skip to content

Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.

SRP test: repeat_n

Yashwanth Kamireddi5b3bae4c84e5
diff --git a/crates/quince-auth/src/srp.rs b/crates/quince-auth/src/srp.rs
index 5adfa24..888a351 100644
--- a/crates/quince-auth/src/srp.rs
+++ b/crates/quince-auth/src/srp.rs
@@ -371,7 +371,7 @@ mod tests {
fn a_server_value_with_a_leading_zero_byte_is_padded() {
let c = Client::with_private_key("[email protected]", &[9u8; 32]);
let mut b = vec![0x00];
- b.extend(std::iter::repeat(0x6d).take(255));
+ b.extend(std::iter::repeat_n(0x6d, 255));
let got = c
.process_challenge("pw", Protocol::S2k, b"salt-salt-salt!!", &b, 1000)
.unwrap();