Auxilium.Functions.SHA1 C# (CSharp) Method

SHA1() public static method

public static SHA1 ( string input ) : string
input string
return string
        public static string SHA1(string input)
        {
            SHA1CryptoServiceProvider sha = new SHA1CryptoServiceProvider();

            string salt = input[input[0] % input.Length] + "B4TH5ALTS" + input.Length;

            byte[] inputBytes = Encoding.UTF8.GetBytes(input + salt);
            byte[] hashedBytes = sha.ComputeHash(inputBytes);

            return BitConverter.ToString(hashedBytes).Replace("-", "");
        }