Skip to main content

issue_token_bytes

Function issue_token_bytes 

Source
pub fn issue_token_bytes(
    secret: &[u8; 32],
    for_node: u64,
    expiry_unix_secs: u64,
) -> Result<[u8; 48], TokenError>
Expand description

Issue a new HMAC-SHA256 join token for for_node that expires at expiry_unix_secs. Returns the raw token bytes (hex-encode for printing or transmission).

Use token_to_hex to produce the hex string.