tahoe-chk-0.2.0.0: The Tahoe-LAFS' Content-Hash-Key (CHK) cryptographic protocol.
Safe HaskellNone
LanguageHaskell2010

Tahoe.CHK.Cipher

Synopsis
  • data Key cipher

Documentation

data Key cipher Source #

A block cipher key which can be deserialized from or serialized to a ByteArray.

This is a wrapper around Crypto.Cipher.Types.Cipher which does not provide a way to recover the original bytes of the key. We provide this by keeping the original bytes around.

Instances

Instances details
Generic (Key cipher) Source # 
Instance details

Defined in Tahoe.CHK.Cipher

Associated Types

type Rep (Key cipher) :: Type -> Type #

Methods

from :: Key cipher -> Rep (Key cipher) x #

to :: Rep (Key cipher) x -> Key cipher #

NFData cipher => NFData (Key cipher) Source # 
Instance details

Defined in Tahoe.CHK.Cipher

Methods

rnf :: Key cipher -> () #

ByteArrayAccess (Key cipher) Source # 
Instance details

Defined in Tahoe.CHK.Cipher

Methods

length :: Key cipher -> Int #

withByteArray :: Key cipher -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: Key cipher -> Ptr p -> IO () #

BlockCipher cipher => BlockCipher (Key cipher) Source # 
Instance details

Defined in Tahoe.CHK.Cipher

Methods

blockSize :: Key cipher -> Int #

ecbEncrypt :: ByteArray ba => Key cipher -> ba -> ba #

ecbDecrypt :: ByteArray ba => Key cipher -> ba -> ba #

cbcEncrypt :: ByteArray ba => Key cipher -> IV (Key cipher) -> ba -> ba #

cbcDecrypt :: ByteArray ba => Key cipher -> IV (Key cipher) -> ba -> ba #

cfbEncrypt :: ByteArray ba => Key cipher -> IV (Key cipher) -> ba -> ba #

cfbDecrypt :: ByteArray ba => Key cipher -> IV (Key cipher) -> ba -> ba #

ctrCombine :: ByteArray ba => Key cipher -> IV (Key cipher) -> ba -> ba #

aeadInit :: ByteArrayAccess iv => AEADMode -> Key cipher -> iv -> CryptoFailable (AEAD (Key cipher)) #

Cipher cipher => Cipher (Key cipher) Source # 
Instance details

Defined in Tahoe.CHK.Cipher

Methods

cipherInit :: ByteArray key => key -> CryptoFailable (Key cipher) #

cipherName :: Key cipher -> String #

cipherKeySize :: Key cipher -> KeySizeSpecifier #

type Rep (Key cipher) Source # 
Instance details

Defined in Tahoe.CHK.Cipher

type Rep (Key cipher) = D1 ('MetaData "Key" "Tahoe.CHK.Cipher" "tahoe-chk-0.2.0.0-inplace" 'False) (C1 ('MetaCons "Key" 'PrefixI 'True) (S1 ('MetaSel ('Just "keyBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScrubbedBytes) :*: S1 ('MetaSel ('Just "keyCipher") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 cipher)))