Skip to main content

expand_msg_xmd

Function expand_msg_xmd 

Source
fn expand_msg_xmd<'a, D>(
    msg: &[&[u8]],
    domain_sep: &[&[u8]],
    buf: &'a mut [u8],
    outlen: usize,
) -> &'a [u8] 
Expand description

Hashes the concatenation of the elements of msg with domain separator equal to the concatenation of domain_sep. The output is an outlen-length slice into buf. Follows https://www.rfc-editor.org/rfc/rfc9380.html#section-5.3.1

§Panics

Panics if the domain separator is empty, if the total length of the domain separator is more than 255 bytes, if outlen is more than 255 * D::output_size(), if outlen is more than 65535, or if dst.len() < outlen`.