Safe Haskell | None |
---|---|
Language | Haskell2010 |
This is the heart of the qnap-decrypt package. It provides the function to decrypt the files encryped by QNAP's Hybrid Backup Sync.
Synopsis
Decrypt
:: String | The password |
-> FilePath | The source file |
-> FilePath | The target file |
-> IO (Maybe DecryptError) | Returns an error or |
Decrypt a QNAP encoded file (does not throw an exception)
Since 0.3.0
Errors
data DecryptError Source #
Errors the decrypter could run into
The Exception instance has a specialized displayException
function
which renders the error in english text (unlike show
which just displays the constructor).
Since 0.3.0
PasswordEmpty | Password is empty |
InvalidKey | Invalid encryption key |
UnknownFileType | Unknown file type (the file is not encrypted or it's version is not known) |
BadMagic | Bad Magic (probably wrong password) |
HeaderDecodeError String | Error decoding the header: <error> |
PaddingError | Padding is corrupt (probably damaged file) |
IOError IOException | IO Exception: <error> |
ZlibError ZlibException | Decompression Exception: <error> (probably damaged file) |
FileSizeMismatch | File size is different than excepted (probably damaged file) |
Instances
Show DecryptError Source # | |
Defined in Crypto.QNAP showsPrec :: Int -> DecryptError -> ShowS # show :: DecryptError -> String # showList :: [DecryptError] -> ShowS # | |
Exception DecryptError Source # | |
Defined in Crypto.QNAP |