README.md
December 4, 2022 ยท View on GitHub
Description
This is a pretty nice and clean MD5 sum for strings. Just Copy and Paste it in. Sorry if it gets bucherd by PSC
More Info
| Submitted On | |
| By | Will (aka DUBAYOU ) Wharton |
| Level | Intermediate |
| User Rating | 3.4 (17 globes from 5 users) |
| Compatibility | C# |
| Category | Security |
| World | .Net (C#, VB.net) |
| Archive File |
Source Code
using System.Security.Cryptography;
static string MD5Str(string raw)
{
MD5 md5serv = MD5CryptoServiceProvider.Create();
byte[] hash;
StringBuilder stringbuff = new StringBuilder();
ASCIIEncoding asciienc = new ASCIIEncoding();
byte[] buffer = asciienc.GetBytes(raw);
hash = md5serv.ComputeHash(buffer);
foreach (byte b in hash)
{
stringbuff.Append(b.ToString("x2"));
}
return stringbuff.ToString();
}