md5 in one line of code

2007-10-25 @ 14:30#

i can't recall where - or when- i got this code (or something very close to it), but it's been handy ever since. a quick and simple MD5 hash within a single (albiet long) line of C# code:

    private string md5(string data)
    {
        return Convert.ToBase64String(new System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(System.Text.Encoding.Default.GetBytes(data)));
    }

code