From 66279d0ff4b00daa26caf3e7bef9381c6a86ff12 Mon Sep 17 00:00:00 2001 From: Arity-T Date: Thu, 21 Nov 2024 15:04:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=B7=D0=B0=D1=88=D0=B8=D1=84=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=BD=D0=BE=D0=B3=D0=BE=20=D1=82=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D1=82=D0=B0=20=D0=B2=20=D1=84=D0=B0=D0=B9=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab3/app/Main.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lab3/app/Main.hs b/lab3/app/Main.hs index 1b04bd9..38f4296 100644 --- a/lab3/app/Main.hs +++ b/lab3/app/Main.hs @@ -22,6 +22,7 @@ main = do let sourceTextPath = "resources/biography.txt" let sourceImagePath = "resources/david.bmp" + let encryptedTextPath = "tmp/biography_encrypted.txt" let encodedImagePath = "tmp/david_" ++ show bitsPerByte ++ "_" ++ show caesarShift ++ ".bmp" let decodedTextPath = "tmp/biography.txt" @@ -34,6 +35,8 @@ main = do putStrLn $ "Размер алфавита: " ++ show (length alphabet) let encryptedText = encryptCaesar alphabet caesarShift inputText putStrLn $ "10 символов шифра: \"" ++ take 10 encryptedText ++ "\"" + writeFile encryptedTextPath encryptedText + putStrLn $ "Зашифрованный текст сохранён в файл \"" ++ encryptedTextPath ++ "\"" let encryptedTextBits = textToBits encryptedText putStrLn $ "10 битов шифра: \"" ++ show (take 10 $ VU.toList encryptedTextBits) ++ "\""