Computes double-pass SHA256 hash by hashing this single-pass SHA256 again
(&self)
| 43 | |
| 44 | // Computes double-pass SHA256 hash by hashing this single-pass SHA256 again |
| 45 | pub fn hash_again(&self) -> DoubleSHA256Hash { |
| 46 | // Second pass: hash the first hash result |
| 47 | let double_hash = digest::digest(&digest::SHA256, &self.0); |
| 48 | |
| 49 | // Convert to fixed-size array |
| 50 | let mut result = [0u8; 32]; |
| 51 | result.copy_from_slice(double_hash.as_ref()); |
| 52 | DoubleSHA256Hash(result) |
| 53 | } |
| 54 | |
| 55 | #[allow(unused)] |
| 56 | pub fn verify_eq(&self, other: &Self) -> bool { |