#+title: File processing in Haskell #+subtitle: Steganography #+date: 2024H2 * Task :PROPERTIES: :CUSTOM_ID: task :END: Create a project in stack. Write all pure functions to the library =Lib.hs= and restrict access to auxiliary functions. Use do notation to work with external files. Find a portrait of Pauli Wolfgang. Convert the image to the =.bmp= format (24‑bit). Save to a file in the =.txt= format: a fragment of his biography (at least 1000 characters without spaces; the text should not end in the middle of a word or sentence). Encode the text into an image using the Caesar cipher (the shift is specified by the user). The key to the cipher is written in the file name. Write a function that decodes the text from the image using the key from the file name and saves the result to a separate text file. Create functions that encrypt the text in the last bit of each byte, the last two bits of each byte, …, all the bits in a byte. Provide examples of image distortions in the report. * Documentation :PROPERTIES: :CUSTOM_ID: documentation :END: The exported report can be found at [[https://git.michalec.dev/files/uni/term-05/func-prog/lab-03/report.pdf][this link]]. * Unlicense :PROPERTIES: :CUSTOM_ID: unlicense :END: #+include: UNLICENSE verse