MCPcopy Create free account
hub / github.com/RustCrypto/utils / raw_pad

Method raw_pad

block-padding/src/lib.rs:106–109  ·  view source on GitHub ↗
(block: &mut [u8], pos: usize)

Source from the content-addressed store, hash-verified

104impl Padding for ZeroPadding {
105 #[inline]
106 fn raw_pad(block: &mut [u8], pos: usize) {
107 assert!(pos <= block.len(), "`pos` is bigger than block size");
108 block[pos..].fill(0);
109 }
110
111 #[inline]
112 fn raw_unpad(block: &[u8]) -> Result<&[u8], Error> {

Callers

nothing calls this directly

Calls 2

expectMethod · 0.80
lenMethod · 0.80

Tested by

no test coverage detected