Class: Enygma::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/enygma/helpers/help.rb

Class Method Summary collapse

Class Method Details

.crackObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/enygma/helpers/help.rb', line 33

def self.crack
  puts(<<-HERE)

To crack a file encrypted with 'Enygma', given that you know the \"encryption date\"

Usage:
crack <cypher-file> [<output>] <date>

Options:
 <cypher-file>\t The path to the input cypher file to be decrypted
 <output>\t (Optional) The path to the output file to save the plain text. If not provided, the new name will be deduced from the source name
 <date>\t\t The date the file was encrypted in this format: ddmmyy (eg. 061115)
HERE
end

.decryptObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/enygma/helpers/help.rb', line 17

def self.decrypt
  puts(<<-HERE)

To decrypt a file encrypted with 'Enygma'

Usage:
decrypt <cypher-file> [<output>] <key> <date>

Options:
 <cypher-file>\t The path to the input cypher file to be decrypted
 <output>\t (Optional) The path to the output file to save the plain text. If not provided, the new name will be deduced from the source name
 <key>\t\t The key used to encrypt the file
 <date>\t\t The date the file was encrypted in this format: ddmmyy (eg. 061115)
HERE
end

.encryptObject



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/enygma/helpers/help.rb', line 3

def self.encrypt
  puts(<<-HERE)

To encrypt a file"

Usage:
encrypt <file> [<output>]

Options:
 <file>\t\t The path to the input file to be encrypted
 <output>\t (Optional) The path to the output file to save the cypher text. If not provided, the new name will be deduced from the source name
HERE
end