Skip to content

Instantly share code, notes, and snippets.

View RileyMills's full-sized avatar

Riley Mills RileyMills

  • Metova Strategies
View GitHub Profile
@RileyMills
RileyMills / vigenere_cipher.rb
Created November 6, 2014 17:42
Ruby implementation of a Vigenere Cipher
class VigenereCipher
attr_reader :input
attr_reader :key
attr_reader :output
def initialize(input, key)
@input = input
@key = key.downcase.gsub(/\W|\d|_/, "")
while @key.size < @input.length