metro-transport-crypto-0.1.0.0: Crypto transport for metro
Safe HaskellNone
LanguageHaskell2010

Metro.TP.Crypto

Documentation

data Crypto cipher tp Source #

Instances

Instances details
(Transport tp, BlockCipher cipher) => Transport (Crypto cipher tp) Source # 
Instance details

Defined in Metro.TP.Crypto

Associated Types

data TransportConfig (Crypto cipher tp) #

Methods

newTransport :: TransportConfig (Crypto cipher tp) -> IO (Crypto cipher tp) #

recvData :: Crypto cipher tp -> Int -> IO ByteString #

sendData :: Crypto cipher tp -> ByteString -> IO () #

closeTransport :: Crypto cipher tp -> IO () #

data TransportConfig (Crypto cipher tp) Source # 
Instance details

Defined in Metro.TP.Crypto

data TransportConfig (Crypto cipher tp) = CryptoConfig (CryptoMethod cipher) cipher (IV cipher) (TransportConfig tp)

crypto :: BlockCipher cipher => CryptoMethod cipher -> cipher -> TransportConfig tp -> TransportConfig (Crypto cipher tp) Source #

crypto_ :: BlockCipher cipher => CryptoMethod cipher -> cipher -> IV cipher -> TransportConfig tp -> TransportConfig (Crypto cipher tp) Source #

data CryptoMethod cipher Source #

Constructors

CryptoMethod 

Fields

makeCrypto :: forall cipher tp. (BlockCipher cipher, Cipher cipher) => cipher -> String -> String -> TransportConfig tp -> TransportConfig (Crypto cipher tp) Source #