Skip to content

Instantly share code, notes, and snippets.

@tomekr
Created February 13, 2012 05:20
Show Gist options
  • Save tomekr/1813903 to your computer and use it in GitHub Desktop.
Save tomekr/1813903 to your computer and use it in GitHub Desktop.
def subtract(secret_num, keystream_num)
secret_num.zip(keystream_num).map do |secret, keystream|
secret = secret + 26 if keystream >= secret
secret - keystream
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment