struct Raft::RPC::Handshake

Overview

HMAC-SHA256 challenge frame for connection authentication.

Sent as the first TLV message on a new TCP connection. Both sides exchange a challenge and verify the peer holds the same cookie.

Defined in:

raft/rpc.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(hmac : Bytes, nonce : Bytes) #

[View source]

Instance Method Detail

def hmac : Bytes #

HMAC-SHA256 digest of the cookie and nonce (32 bytes).


[View source]
def nonce : Bytes #

Random nonce (32 bytes).


[View source]
def type : Type #

[View source]