class Cryptotools::Cryptography
Public Class Methods
mixed_alphabetic()
click to toggle source
Multitool::Cryptography.mixed_alphabetic
# 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()
click to toggle source
Multitool::Cryptography.shuffle_keys
# File lib/cryptotools.rb, line 53 def self.shuffle_keys system("cd keyset; ./shuffle.sh") puts "Keys have been shuffled." sleep(3) end