Struct snow::Builder[][src]

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

The default pure-rust crypto implementation resolver. Generates a Session and also validate 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();

Methods

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

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 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)

Auto Trait Implementations

impl<'builder> !Send for Builder<'builder>

impl<'builder> !Sync for Builder<'builder>