fn validate_user_id(sender_pubkey: &[u8], id: &UserId) -> Result<(), RequestValidationError> {
    if id.get_ref() == &PrincipalId::new_self_authenticating(sender_pubkey) {
        Ok(())
    } else {
        Err(UserIdDoesNotMatchPublicKey(*id, sender_pubkey.to_vec()))
    }
}
// Verifies that the user id matches the public key.  Returns an error if not.
Verifies that the user id matches the public key.  Returns an error if not.
Verifies that the user id matches the public key . Returns an error if not .
fn validate_user_id(sender_pubkey: &[u8], id: &UserId) -> Result<(), RequestValidationError> {
    if id.get_ref() == &PrincipalId::new_self_authenticating(sender_pubkey) {
        Ok(())
    } else {
        Err(UserIdDoesNotMatchPublicKey(*id, sender_pubkey.to_vec()))
    }
}
fn validate_user_id ( sender_pubkey : & [ u8 ] , id : & UserId ) -> Result < ( ) , RequestValidationError > { if id . get_ref ( ) == & PrincipalId :: new_self_authenticating ( sender_pubkey ) { Ok ( ( ) ) } else { Err ( UserIdDoesNotMatchPublicKey ( * id , sender_pubkey . to_vec ( ) ) ) } }
Verifies that the user id matches the public key.
Verifies that the user id matches the public key .
sender_pubkey
&[u8]
id
&UserId
sender_pubkey
&[u8]
id
&UserId