Guest User

Untitled

a guest
Oct 17th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. fn hash_block(data: &String, nonce: i64) -> String {
  2. let formatted_string = format!("{}{}", data, nonce);
  3. let hashable_string = &formatted_string;
  4.  
  5. let mut hasher = Sha256::new();
  6. hasher.input_str(hashable_string);
  7. let result = hasher.result_str();
  8.  
  9. return result;
  10. }
Add Comment
Please, Sign In to add comment