rncryptor-0.0.2.3: Haskell implementation of the RNCryptor file format

Safe HaskellNone
LanguageHaskell2010

Crypto.RNCryptor.Types

Synopsis

Documentation

data RNCryptorHeader Source

Constructors

RNCryptorHeader 

Fields

rncVersion :: !Word8

Data format version. Currently 3.

rncOptions :: !Word8

bit 0 - uses password

rncEncryptionSalt :: !ByteString

iff option includes "uses password"

rncHMACSalt :: !ByteString

iff options includes "uses password"

rncIV :: !ByteString

The initialisation vector The ciphertext is variable and encrypted in CBC mode

rncHMAC :: ByteString -> ByteString

The HMAC (32 bytes). This field is a continuation as the HMAC is at the end of the file.

newtype UserInput Source

Constructors

UI 

Fields

unInput :: ByteString
 

newRNCryptorHeader :: ByteString -> IO RNCryptorHeader Source

Generates a new RNCryptorHeader, suitable for encryption.

renderRNCryptorHeader :: RNCryptorHeader -> ByteString Source

Concatenates this RNCryptorHeader into a raw sequence of bytes, up to the IV. This means you need to append the ciphertext plus the HMAC to finalise the encrypted file.