forked from ISS-Security/hw-credit_card_crypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
substitution_cipher.rb
41 lines (38 loc) · 1010 Bytes
/
substitution_cipher.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
module SubstitutionCipher
module Caesar
# Encrypts document using key
# Arguments:
# document: String
# key: Fixnum (integer)
# Returns: String
def self.encrypt(document, key)
# TODO: encrypt string using caesar cipher
end
# Decrypts String document using integer key
# Arguments:
# document: String
# key: Fixnum (integer)
# Returns: String
def self.decrypt(document, key)
# TODO: decrypt string using caesar cipher
end
end
module Permutation
# Encrypts document using key
# Arguments:
# document: String
# key: Fixnum (integer)
# Returns: String
def self.encrypt(document, key)
# TODO: encrypt string using a permutation cipher
end
# Decrypts String document using integer key
# Arguments:
# document: String
# key: Fixnum (integer)
# Returns: String
def self.decrypt(document, key)
# TODO: decrypt string using a permutation cipher
end
end
end