vendor/gems/rubyzip-0.9.1/lib/quiz1/t/solutions/Carlos/solitaire.rb
# returns an array with the code of the letters,
# padded with the code of X
returns an array with the code of the letters,
padded with the code of X
returns an array with the code of the letters padded with the code of X
def crypt (deck, decrypt=false)
		numbers = to_numbers
		keystream = deck.generate_keystream numbers.length
		result = ""
		numbers.zip(keystream) do |n, k|
			k = -k if decrypt
			result << (n+k).to_letter
		end
		result
	end
def crypt ( deck , decrypt = false ) numbers = to_numbers keystream = deck . generate_keystream numbers . length result = "" numbers . zip ( keystream ) do | n , k | k = - k if decrypt result << ( n + k ) . to_letter end result end
returns an array with the code of the letters,
padded with the code of X
returns an array with the code of the letters padded with the code of X
deck
<not_specific>
decrypt
<not_specific>