Struct snow::NoiseBuilder [] [src]

pub struct NoiseBuilder<'builder> { /* fields omitted */ }

Generates a NoiseSession and also validate that all the prerequisites for the given parameters are satisfied.

Examples

let noise = NoiseBuilder::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();

Methods

impl<'builder> NoiseBuilder<'builder>
[src]

Create a NoiseBuilder with the default crypto resolver.

Create a NoiseBuilder with a custom crypto resolver.

Specify a PSK (only used with NoisePSK base parameter)

Your static private key, can be generated by generate_private_key().

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

The responder's static public key.

Generate a new private key. It's up to the user of this library how to store this.

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

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