using System.Collections.Generic;
using System.Security.Cryptography;
public string nimi { get; set; }
public int rahaa { get; set; }
public int timantteja { get; set; }
public int voittoja { get; set; }
public int tappioita { get; set; }
public ulong todiste { get; set; }
public static void Main()
SaveData sd = new SaveData()
SaveData sd1 = FindSuitable(sd);
string json = JsonConvert.SerializeObject(sd1);
Console.WriteLine(SHA1(json));
private static string GenerateHashString(HashAlgorithm algo, string text)
algo.ComputeHash(Encoding.UTF8.GetBytes(text));
result.Select(x => x.ToString("X2")));
private static SaveData FindSuitable(SaveData input)
string startMatchToSeek = "000";
string result = SHA1(JsonConvert.SerializeObject(input));
while (!result.StartsWith(startMatchToSeek))
result = SHA1(JsonConvert.SerializeObject(input));
public static string SHA1(string text)
var result = default(string);
using (var algo = new SHA1Managed())
result = GenerateHashString(algo, text);