Skip to main content

encode_identity_assertion

Function encode_identity_assertion 

Source
pub fn encode_identity_assertion(
    public_key: &[u8],
    signature: &[u8],
    signed_data: &[u8],
) -> Result<Vec<u8>>
Expand description

Joins the three fields into the wire layout.

ยงErrors

Returns SealedError::InvalidPublicKey if public_key is not 32 bytes and SealedError::Serialization if signature is not 64. Both lengths are the format: a reader locates the fields by offset, so a short key would be parsed as a key whose first bytes of signature are its tail.