fn signing_input(protected_header: &[u8], payload: &[u8]) -> Vec<u8> {
    let hlen = BASE64URL_NOPAD.encode_len(protected_header.len());
    let plen = BASE64URL_NOPAD.encode_len(payload.len());
    let mut r = Vec::with_capacity(hlen + plen + 1);
    r.append(&mut BASE64URL_NOPAD.encode(protected_header).into_bytes());
    r.push(b'.');
    r.append(&mut BASE64URL_NOPAD.encode(payload).into_bytes());
    r
}
// Warning: pay attention to parameter order
// Note: this is valid UTF-8, but gets used as bytes later
pay attention to parameter order
Note: this is valid UTF-8, but gets used as bytes later
pay attention to parameter order Note : this is valid UTF - 8 but gets used as bytes later
fn signing_input(protected_header: &[u8], payload: &[u8]) -> Vec<u8> {
    let hlen = BASE64URL_NOPAD.encode_len(protected_header.len());
    let plen = BASE64URL_NOPAD.encode_len(payload.len());
    let mut r = Vec::with_capacity(hlen + plen + 1);
    r.append(&mut BASE64URL_NOPAD.encode(protected_header).into_bytes());
    r.push(b'.');
    r.append(&mut BASE64URL_NOPAD.encode(payload).into_bytes());
    r
}
fn signing_input ( protected_header : & [ u8 ] , payload : & [ u8 ] ) -> Vec < u8 > { let hlen = BASE64URL_NOPAD . encode_len ( protected_header . len ( ) ) ; let plen = BASE64URL_NOPAD . encode_len ( payload . len ( ) ) ; let mut r = Vec :: with_capacity ( hlen + plen + 1 ) ; r . append ( & mut BASE64URL_NOPAD . encode ( protected_header ) . into_bytes ( ) ) ; r . push ( b'.' ) ; r . append ( & mut BASE64URL_NOPAD . encode ( payload ) . into_bytes ( ) ) ; r }
Warning: pay attention to parameter order
Note: this is valid UTF-8, but gets used as bytes later
Warning : pay attention to parameter order Note : this is valid UTF - 8 but gets used as bytes later
protected_header
&[u8]
payload
&[u8]
protected_header
&[u8]
payload
&[u8]