packages feed

filepath-crypto 0.0.0.1 → 0.0.0.2

raw patch · 3 files changed

+11/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

changes.md view
@@ -1,3 +1,6 @@+# 0.0.0.2+    - Improved documentation+ # 0.0.0.1     - Improved documentation 
filepath-crypto.cabal view
@@ -1,5 +1,5 @@ name:                filepath-crypto-version:             0.0.0.1+version:             0.0.0.2 synopsis:            Reversable and secure encoding of object ids as filepaths license:             BSD3 license-file:        LICENSE
src/System/FilePath/Cryptographic.hs view
@@ -9,8 +9,11 @@ type of kind 'Symbol'). The serialized payload is encrypted using a symmetric cipher in CBC mode using the hashed namespace as an initialization vector (IV).-The ciphertext is then <https://hackage.haskell.org/package/sandi/docs/Codec-Binary-Base32.html base32>-encoded and padding stripped. +The ciphertext is then+<https://hackage.haskell.org/package/sandi/docs/Codec-Binary-Base32.html base32>-encoded+and padding stripped.+ Rather than being indicated by the amount of padding, the length of the serialized plaintext is instead carried at the type level within 'CryptoFileName' (analogously to the namespace).@@ -20,9 +23,9 @@ Since the serialized payload is padded to the length of the next cipher block we can detect namespace mismatches by checking that all bytes expected to have been inserted during padding are nil.-The probability of detecting a namespace mismatch is thus-\[1 - 2^{b \cdot \left \lceil \frac{l}{b} \right \rceil-l}])-where \(l\) is the length of the serialized payload.+The probability of detecting a namespace mismatch is thus \(1 - 2^{b \left \lceil \frac{l}{b} \right \rceil - l}\)+where \(l\) is the length of the serialized payload and \(b\) the length of a+ciphertext block (both in bits). -} module System.FilePath.Cryptographic   ( CryptoID(..)