(data: ArgBytesLike, begin_state: OptionalArg<PyIntRef>)
| 64 | |
| 65 | #[pyfunction] |
| 66 | fn adler32(data: ArgBytesLike, begin_state: OptionalArg<PyIntRef>) -> u32 { |
| 67 | data.with_ref(|data| { |
| 68 | let begin_state = begin_state.map_or(1, |i| i.as_u32_mask()); |
| 69 | |
| 70 | let mut hasher = Adler32::from_value(begin_state); |
| 71 | hasher.update_buffer(data); |
| 72 | hasher.hash() |
| 73 | }) |
| 74 | } |
| 75 | |
| 76 | #[pyfunction] |
| 77 | fn crc32(data: ArgBytesLike, begin_state: OptionalArg<PyIntRef>) -> u32 { |
nothing calls this directly
no test coverage detected