Skip to main content

tie_message

Function tie_message 

Source
pub fn tie_message(
    server: &[u8; 32],
    nonce: &[u8; 32],
    user: &PortableUserId,
    username: &str,
) -> Option<Vec<u8>>
Expand description

What a portable user signs to tie their identity to the local account username on the server whose endpoint id is server, answering the server’s nonce: TIE_DOMAIN, the server’s id (32 bytes), the nonce (32), the user (32), then the username’s length in bytes (u16, big-endian) and its UTF-8. Each part keeps a proof from being used elsewhere: on another server, again on this one, for another identity, or onto another account here.

None for a username of more than 65,535 bytes, which no server has (a username is at most 64 characters).