pipes-cacophony-0.5.0: Pipes for Noise-secured network connections.

MaintainerJohn Galt <jgalt@centromere.net>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Pipes.Noise

Contents

Description

 

Synopsis

Types

type InboundNoisePipe = Pipe ByteString ScrubbedBytes Source #

Pipe used for inbound Noise messages.

type OutboundNoisePipe = Pipe ScrubbedBytes ByteString Source #

Pipe used for outbound Noise messages.

Pipes

mkNoisePipes :: (Monad m, Cipher c, DH d, Hash h) => NoiseState c d h -> Maybe (InboundNoisePipe m (NoiseResult c d h), OutboundNoisePipe m (NoiseResult c d h)) Source #

Creates a pair of Pipes, the first used for inbound messages and the second used for outbound messages. Note: The handshake for the given NoiseState must be complete. If it is not, this function will return Nothing.