public byte[] HashPassword(byte[] password, byte[] salt) { var saltedPassword = salt.Concat(password).ToArray(); var hashedPassword = new SHA512Managed().ComputeHash(saltedPassword); var hashedSalt = new SHA512Managed().ComputeHash(salt); var saltedHash = hashedSalt.Concat(hashedPassword).ToArray(); return(saltedHash); }