Skip to content

Instantly share code, notes, and snippets.

@cvonkleist
Created September 1, 2010 20:01
Show Gist options
  • Save cvonkleist/561252 to your computer and use it in GitHub Desktop.
Save cvonkleist/561252 to your computer and use it in GitHub Desktop.
def vxworks_sum(plaintext)
int = 0
0.upto(plaintext.length - 1) do |i|
int += plaintext[i] * (i + 1) ^ (i + 1)
end
int
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment