diff --git a/lib/Ramzay.rb b/lib/Ramzay.rb new file mode 100644 index 0000000..6bd6e17 --- /dev/null +++ b/lib/Ramzay.rb @@ -0,0 +1,50 @@ +class Ramzay + def self.encrypt (str) + matrix = [['s','i','o','e','r','a','t','n','-','-'], + ['c','x','u','d','j','p','z','b','k','q'], + ['.','w','f','l','/','g','m','y','h','v']] + str = str.gsub(/ /,'/') + arr ="" + str.each_byte do |c| + matrix.each_with_index do |row, i| + row.each_with_index do |a, j| + if c.chr==a + if i==0 + arr<