Commit ca341591 authored by Vicente Parra Hurtado's avatar Vicente Parra Hurtado

Alpha 0.1.3

parent 75247dca
wZUo9KFkFrd3e9wUhC0VeyozKZqT+voWGkGY0AGC0keQi7a+1ny1sJbtYAE6d8BIIymkYRlV5/AVfiE9B3GwRrHch04HTsdd8mRXCvu9pyNcInv5ZnejMBeU3l6KXcZicH4i3b/GL30RhnV+zjcWiwTiGX9TuAlN5dhcBjWQoynskf5omp25fYSbfkL8x9ltI3lx0LBgten4BO+oHnFbocqaYf4O5P9Tl4x2xltBs2Yb32d0zUYOvDgD2XQYCVeESBlGnF8gS5SGY6TpftyNTj942sAaFJqxKrnYzsvit/VsMkR0iw/tf1KG6thQOIDnlBpNZBm93YdzPFCV05FnvA==
\ No newline at end of file
C8U jE1A~7~SK]SY%HߵiF@c93
\ No newline at end of file
......@@ -62,6 +62,8 @@ main = do
let vectorIV = B.pack ( take 16 $ B.unpack source )
let password = B.pack (take 32 ( drop 16 $ B.unpack source ))
let order = B.pack (drop 48 $ B.unpack source )
let rows = passwordRows $ B.unpack order
let cols = passwordCols $ B.unpack order
putStrLn "Reading Passwords (512 bites) ---- is OK"
-- Text to crypt
......@@ -80,8 +82,9 @@ main = do
g <- newStdGen
texto <- encryptext g bock password vectorIV line
-- B.writeFile fileName2 texto
let rows = passwordRows $ B.unpack order
let cols = passwordCols $ B.unpack order
-- only 128 text
let textoMatrix = orderBytes 10 (B.unpack texto) rows cols
let base64 = BS.encode textoMatrix
putStrLn "Encrypting Text ---- is Ok"
......@@ -99,6 +102,8 @@ main = do
let vectorIV = B.pack ( take 16 $ B.unpack source )
let password = B.pack (take 32 ( drop 16 $ B.unpack source ))
let order = B.pack (drop 48 $ B.unpack source )
let rows = passwordRows $ B.unpack order
let cols = passwordCols $ B.unpack order
putStrLn "Reading Passwords (512 bites) ---- is OK"
-- Decrypt
......@@ -107,8 +112,7 @@ main = do
let base64 = BS.decodeLenient code
putStrLn "Decodig Encrypted Text ---- is OK"
let rows = passwordRows $ B.unpack order
let cols = passwordCols $ B.unpack order
let textoMatrix = orderInvBytes 10 (B.unpack base64) rows cols
let num = div ((BC.length (textoMatrix))-1) 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment