MCPcopy Index your code
hub / github.com/RustPython/RustPython / hash_digest_size

Function hash_digest_size

crates/stdlib/src/hashlib.rs:237–253  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

235 }
236
237 fn hash_digest_size(name: &str) -> Option<usize> {
238 match name {
239 "md5" => Some(16),
240 "sha1" => Some(20),
241 "sha224" => Some(28),
242 "sha256" => Some(32),
243 "sha384" => Some(48),
244 "sha512" => Some(64),
245 "sha3_224" => Some(28),
246 "sha3_256" => Some(32),
247 "sha3_384" => Some(48),
248 "sha3_512" => Some(64),
249 "blake2b" => Some(64),
250 "blake2s" => Some(32),
251 _ => None,
252 }
253 }
254
255 fn unsupported_hash(name: &str, vm: &VirtualMachine) -> PyBaseExceptionRef {
256 vm.new_exception_msg(

Callers 1

pbkdf2_hmacFunction · 0.85

Calls 1

SomeClass · 0.50

Tested by

no test coverage detected