Esempio n. 1
0
        private static string Shard(string input)
        {
            uint hash = Crc32.ComputeChecksum(Encoding.UTF8.GetBytes(input));

            return(((hash % 5 + 5) % 5 + 1).ToString());
        }
Esempio n. 2
0
        private static string Shard(string input)
        {
            uint hash = Crc32.ComputeChecksum(Encoding.UTF8.GetBytes(input));

            return(((((hash % 5) + 5) % 5) + 1).ToString(CultureInfo.InvariantCulture));
        }