byte[] bytes = ASCIIEncoding.ASCII.GetBytes(textBox1.Text);
int hash = 1;
for (int n = 0; n < 10000; n++)
{
for (int i = 0; i < bytes.Length; i++)
{
if ((i * n) % 5 == 0)
{
hash *= bytes[i];
}
if ((i * n) % 5 == 1)
{
hash += bytes[i];
}
if ((i * n) % 5 == 2)
{
hash -= bytes[i];
}
if ((i * n) % 5 == 3)
{
hash += bytes[i];
}
if ((i * n) % 5 == 4)
{
hash *= bytes[i];
}
}
}
return hash
Related posts:








0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment