MCPcopy Create free account
hub / github.com/RustCrypto/RSA / try_fill_bytes

Method try_fill_bytes

tests/generate.rs:93–101  ·  view source on GitHub ↗
(&mut self, bytes: &mut [u8])

Source from the content-addressed store, hash-verified

91 }
92
93 fn try_fill_bytes(&mut self, bytes: &mut [u8]) -> Result<(), Self::Error> {
94 if bytes.len() > self.budget {
95 return Err(Exhausted(self.used));
96 }
97 self.budget -= bytes.len();
98 self.used += bytes.len();
99 bytes.fill(0xaa);
100 Ok(())
101 }
102}
103
104impl TryCryptoRng for RepeatingRng {}

Callers 2

try_next_u32Method · 0.45
try_next_u64Method · 0.45

Calls 1

ExhaustedClass · 0.70

Tested by

no test coverage detected