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

Alpha 0.4

parent fa91a732
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.31.2.
-- This file has been generated from package.yaml by hpack version 0.32.0.
--
-- see: https://github.com/sol/hpack
--
-- hash: e22a32b5a05eab746db788bfba70c4c8ad582e414c038a44d577ecb429a54f91
-- hash: f81577a17be4e93ba702755069898138389676c93f86cd3d568d197ad4167eb3
name: CrypText
version: 0.1.0.0
......@@ -59,23 +59,6 @@ executable CrypText-exe
, text
default-language: Haskell2010
executable CrypTextGUI-exe
main-is: Main.hs
other-modules:
Paths_CrypText
hs-source-dirs:
GUI
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
CrypText
, base >=4.7 && <5
, base64-bytestring
, bytestring
, cryptonite
, random
, text
default-language: Haskell2010
executable KeyGen-exe
main-is: Main.hs
other-modules:
......
import NukeBull
import EncrypText
import System.Environment
import Data.Bits
import Data.Word
import Data.Either
import Data.Maybe
import System.Random
import Crypto.Random(getSystemDRG, randomBytesGenerate)
import Crypto.KDF.Scrypt (generate, Parameters(..))
import qualified Data.ByteString as B
import qualified Data.ByteString.Base64 as BS
main = do
(comando:_) <- getArgs
case comando of
"keyGen" -> do
(_:fileName10:_) <- getArgs
let fileName1 = "Keys/" ++ fileName10
-- Read Password = 384 bytes = 16 vectorIV + 32 AES256 + 16 Cipher Lv.3.1 + 64 RandomGen Lv 3.2 + 256 Cipher Lv.3.3
g <- getStdGen
g <- newStdGen
drg <- getSystemDRG
let passwords = randomBytesString 320 g
B.writeFile fileName1 passwords
putStrLn "Creating vectorIV ---- is OK"
putStrLn "Creating AES256 ---- is OK"
putStrLn "Creating Password Lv. 3.1 ---- is OK"
putStrLn "Creating Password Lv. 3.2 ---- is OK"
putStrLn "Creating Password Lv. 3.3 ---- is OK"
putStrLn "Writing File (384 bytes - 3072 bites) ---- is OK"
let pasword64 = BS.encode passwords
B.writeFile fileName1 pasword64
otherwise ->do
putStrLn "First Argument Is Not Valid"
putStrLn "Used: keyGen FilePad Name"
putStrLn "Used: encrypt FilePad(Password) FilePad (Output)"
putStrLn "Used: decrypt FilePad(Password) FilePad (Output)"
......@@ -42,15 +42,7 @@ executables:
dependencies:
- CrypText
CrypTextGUI-exe:
main: Main.hs
source-dirs: GUI
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- CrypText
KeyGen-exe:
main: Main.hs
......
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