Rust: Make the Seed case a tiny bit more realistic.

This commit is contained in:
Geoffrey White
2026-06-18 23:37:12 +01:00
parent b86cb6df63
commit 721070a191
2 changed files with 4 additions and 4 deletions

View File

@@ -7,6 +7,6 @@
| test.rs:74:9:74:23 | ...::new(...) | HashingAlgorithm MD5 WEAK |
| test.rs:133:26:133:40 | ...::new(...) | HashingAlgorithm MD5 WEAK |
| test.rs:156:26:156:40 | ...::new(...) | HashingAlgorithm MD5 WEAK |
| test.rs:176:13:176:23 | ...::new(...) | EncryptionAlgorithm SEED |
| test.rs:176:13:176:24 | ...::new(...) | EncryptionAlgorithm SEED |
| test.rs:199:22:199:32 | ...::new(...) | HashingAlgorithm SHA1 WEAK |
| test.rs:211:13:211:35 | ...::compute(...) | HashingAlgorithm MD5 WEAK inputs:1 |

View File

@@ -165,15 +165,15 @@ struct Seed {
}
impl Seed {
fn new() -> Self {
fn new(seed_value: u64) -> Self {
Seed { }
}
}
fn test_seed() {
// this will be misrecognized as a use of the SEED algorithm, but being a strong
// algorithm there is no query result anyway.
let _ = Seed::new(); // $ Alert[rust/summary/cryptographic-operations]
// algorithm and not sensitive data, there is no query result anyway.
let _ = Seed::new(0); // $ Alert[rust/summary/cryptographic-operations]
}
// ---