Class: Cryptotools::Cryptography
- Inherits:
-
Object
- Object
- Cryptotools::Cryptography
- Defined in:
- lib/cryptotools.rb
Class Method Summary collapse
-
.mixed_alphabetic ⇒ Object
Multitool::Cryptography.mixed_alphabetic.
-
.shuffle_keys ⇒ Object
Multitool::Cryptography.shuffle_keys.
Class Method Details
.mixed_alphabetic ⇒ Object
Multitool::Cryptography.mixed_alphabetic
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/cryptotools.rb', line 39 def self.mixed_alphabetic alph = File.read("keyset/alph.txt") beta = File.read("keyset/beta.txt") print "Plaintext << " plaintext = gets.chomp ciphertext = plaintext.tr alph, beta print "Ciphertext >> " puts ciphertext end |
.shuffle_keys ⇒ Object
Multitool::Cryptography.shuffle_keys
53 54 55 56 57 58 59 |
# File 'lib/cryptotools.rb', line 53 def self.shuffle_keys system("cd keyset; ./shuffle.sh") puts "Keys have been shuffled." sleep(3) end |