add the whole API stuff first iteration

This commit is contained in:
Stanley Dimant
2022-06-19 01:57:37 +02:00
parent 176eb2a344
commit 1312086a8d
10 changed files with 692 additions and 92 deletions

View File

@@ -18,5 +18,11 @@ namespace MareSynchronos.Utils
using SHA1CryptoServiceProvider cryptoProvider = new();
return BitConverter.ToString(cryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(stringToHash))).Replace("-", "");
}
public static string GetHash256(string stringToHash)
{
using SHA256CryptoServiceProvider cryptoProvider = new();
return BitConverter.ToString(cryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(stringToHash))).Replace("-", "");
}
}
}