Safe Haskell | None |
---|---|
Language | Haskell2010 |
The encryption scheme used for DTB files found on game discs.
- oldCrypt :: Crypt
- newCrypt :: Crypt
- decrypt :: Crypt -> ByteString -> ByteString
- encrypt :: Crypt -> Key -> ByteString -> ByteString
- decryptFile :: Crypt -> FilePath -> FilePath -> IO ()
- encryptFile :: Crypt -> Key -> FilePath -> FilePath -> IO ()
- decryptHandle :: Crypt -> Handle -> Handle -> IO ()
- encryptHandle :: Crypt -> Key -> Handle -> Handle -> IO ()
- type Key = Word32
- type Crypt = Key -> [Word8]
Documentation
decrypt :: Crypt -> ByteString -> ByteString Source #
Take the first four bytes of the string as the key, and decrypt the rest of the file.
encrypt :: Crypt -> Key -> ByteString -> ByteString Source #
Encrypt a string with a key, and append the key to the encrypted string.
decryptFile :: Crypt -> FilePath -> FilePath -> IO () Source #
Decrypt an encrypted DTB file using the given crypt method.
encryptFile :: Crypt -> Key -> FilePath -> FilePath -> IO () Source #
Encrypt an unencrypted DTB file using the given crypt method and key.
decryptHandle :: Crypt -> Handle -> Handle -> IO () Source #
Decrypt an encrypted DTB file across two handles.