Explorar el Código

Added documentation to hash256.rs

Lorenz Bung hace 7 años
padre
commit
cef4324040
No account linked to committer's email address
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      hw7/task1/src/hash256.rs

+ 2
- 1
hw7/task1/src/hash256.rs Ver fichero

@@ -1,12 +1,13 @@
1 1
 use hasher_sha256::{Hasher, HashResult};
2 2
 use hasher_sha256::Sha256;
3 3
 
4
-
4
+/// Dieser Datentyp beschreibt die Lösung des Hashverfahrens.
5 5
 pub struct Solution {
6 6
     pub number: usize,
7 7
     pub hash: String,
8 8
 }
9 9
 
10
+/// `verify_product` dient der Verifikation eines gefundenen Hashes.
10 11
 pub fn verify_product(base: usize, number: usize, difficulty: &String) -> Option<Solution> {
11 12
     let sol = base * number;
12 13
     let input = sol.to_string();

Loading…
Cancelar
Guardar