pub struct Builder<'builder> { /* private fields */ }
Expand description

Generates a HandshakeState and also validates that all the prerequisites for the given parameters are satisfied.

Examples

let noise = Builder::new("Noise_XX_25519_ChaChaPoly_BLAKE2s".parse().unwrap())
    .local_private_key(&my_long_term_key)
    .remote_public_key(&their_pub_key)
    .prologue("noise is just swell".as_bytes())
    .build_initiator()
    .unwrap();

Implementations

Create a Builder with the default crypto resolver.

Create a Builder with a custom crypto resolver.

Specify a PSK (only used with NoisePSK base parameter)

Your static private key (can be generated with generate_keypair()).

Arbitrary data to be hashed in to the handshake hash value.

The responder’s static public key.

Generate a new asymmetric keypair (for use as a static key).

Build a HandshakeState for the side who will initiate the handshake (send the first message)

Build a HandshakeState for the side who will be responder (receive the first message)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.