MCPcopy Index your code
hub / github.com/git/git / CryptoDigest

Interface CryptoDigest

src/hash.rs:116–128  ·  view source on GitHub ↗

A trait to implement hashing with a cryptographic algorithm.

Source from the content-addressed store, hash-verified

114
115/// A trait to implement hashing with a cryptographic algorithm.
116pub 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///

Callers

nothing calls this directly

Implementers 1

hash.rssrc/hash.rs

Calls

no outgoing calls

Tested by

no test coverage detected