[−][src]Function haybale_pitchfork::hook_helpers::fill_secret_with_length
pub fn fill_secret_with_length(
state: &mut State<Backend>,
out_buffer: Either<&Operand, BV>,
out_len_ptr: Either<&Operand, BV>,
max_buffer_len_bytes: u32,
buffer_name: String
) -> Result<()>
Fills a buffer with secret data, and also outputs the number of bytes written.
The entire max_buffer_len_bytes
-byte buffer will be written, but the output number of bytes will be constrained to be any number between 0 and max_buffer_len_bytes
.
For the buffer and length pointer, this accepts either an Operand
or a BV
.
If an Operand
is provided, it will be type-checked and converted to BV
.
If a BV
is provided, we'll assume the caller has done all appropriate typechecking.