A trait to implement hashing with a cryptographic algorithm.
| 114 | |
| 115 | /// A trait to implement hashing with a cryptographic algorithm. |
| 116 | pub trait CryptoDigest { |
| 117 | /// Return true if this digest is safe for use with untrusted data, false otherwise. |
| 118 | fn is_safe(&self) -> bool; |
| 119 | |
| 120 | /// Update the digest with the specified data. |
| 121 | fn update(&mut self, data: &[u8]); |
| 122 | |
| 123 | /// Return an object ID, consuming the hasher. |
| 124 | fn into_oid(self) -> ObjectID; |
| 125 | |
| 126 | /// Return a hash as a `Vec`, consuming the hasher. |
| 127 | fn into_vec(self) -> Vec<u8>; |
| 128 | } |
| 129 | |
| 130 | /// A structure to hash data with a cryptographic hash algorithm. |
| 131 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected