Skip to main content

signing_payload

Function signing_payload 

Source
pub fn signing_payload(
    state_change_id: ChangeId,
    kind: ReviewKind,
    scope: &ReviewScope,
    signed_at: i64,
    justification: Option<&str>,
) -> Vec<u8> 
Expand description

Build the deterministic byte payload that a ReviewSignature is computed over. Re-implementing this in another language (TypeScript, Python) must produce byte-identical output for verification to round-trip.

Layout: version tag, then NUL-terminated string fields, then fixed-width integers. Uses NUL byte as a field separator, which is safe because change_id is hex and other fields are utf-8 strings without embedded NULs.