Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • 0.19.X
  • discrete
  • 0.18.X
  • ignore_lambda_to_diff_errors
  • 0.17.X
  • authors-update
  • 0.16.X
  • 0.15.X
  • 0.14.X
  • debian
  • 0.13.X
  • 0.12.X
  • 0.11.X
  • 0.10.X
  • 0.9.X
  • 0.6.X
  • 0.7.X
  • 0.8.X
  • 0.19.1
  • 0.19.0
  • 0.19b2
  • 0.19b1
  • 0.19-branching
  • 0.18.2
  • 0.18.1
  • 0.18
  • 0.18rc2
  • 0.18rc1
  • 0.18rc
  • 0.17.1-1
  • 0.17.1
  • debian/0.17.0-4
  • debian/0.17.0-3
  • debian/0.17.0-1
  • 0.17
  • debian/0.17.0_b1+git14-g4e6829c-1
  • debian/0.17.0_b1-1
  • 0.17b1
39 results

sklearn

  • Clone with SSH
  • Clone with HTTPS
  • #EncryptDecrypt Tool

    This tool lets you both encrypt and decrypt files using three different ciphers:

    • Caesar Cipher
    • XOR Cipher
    • Vigenere Cipher

    You run this tool in the terminal, choose which cipher you want, the program will ask you for a file and a key that you wish to use.


    Compiling

    Open the terminal and type:

    g++ main.cpp EncryptDecrypt.cpp Help.cpp -o EncryptDecrypt

    This create a file called EncryptDecryptTool that you can run.


    Running the tool

    In the terminal, use this format to run the tool

    ./EncryptDecrypt [encrypt/decrypt][cipher][filename][key]

    Ciphers supported:

    • caesar — requires a number key (e.g. 3)
    • xor — requires a single character key (e.g. X)
    • vigenere — requires a word or string key (e.g. Secret)

    Examples

    Caesar encryption with the shift 16

    ./EncryptDecrypt encrypt caesar file.txt 16

    XOR decryption with key X

    ./EncryptDecrypt decrypt XOR file.txt X

    Vigenere encryption with the key SecretKey1234

    ./EncryptDecrypt encrypt vigenere file.txt SecretKey1234