So I wanted to code a simple PRNG for generating terrain in a game. It has to have the following properties:Computationally cheap Generate semi random numbers between 0 and an positive integer. I need to be able to go back and teleport anywhere in the world so random.Next doesn't cut it. I basically want a noise function. One output for each input with repeatable results. No seed will be used. If I need another series I'll just shift x value by a couple of millionsThese are some outputs produced by my program:1 as input (x) gives 2 as a pseudo random number2 as input (x) gives 2 as a pseudo random numberusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Threading;using System.Security.Cryptography;namespace Hashing_Functions{    class Program    {        static void Main(string[] args)        {            int i0 = 0;            while (true)            {                i0++;                                Console.WriteLine(RandomHashFunction(i0, 10));                //returns random number between 0 and max based on input            }        }        static int RandomHashFunction(int input, int max)        {            var SHA1 = new SHA1CryptoServiceProvider();            StringBuilder sb = new StringBuilder();            string hash2string;            double output;            byte[] hash;            SHA1.ComputeHash(ASCIIEncoding.ASCII.GetBytes(input.ToString()));            hash = SHA1.Hash;            sb.Clear();            foreach (byte b in hash)            {                sb.Append(b.ToString());            }            hash2string = sb.ToString();            output = hash2string.GetHashCode();            output = Math.IEEERemainder(output, max);            output = Math.Abs(output);            return Convert.ToInt16(output);        }    }}
Using hashing to create a PRNG with seed
c#;beginner;hashcode