code_junkie

One line code examples in various languages for MD5

Nov 12th, 2011
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. string hash = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(input, "md5");
  2.  
  3. string hash = Convert.ToBase64String(newSystem.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(System.Text.Encoding.UTF8.GetBytes(input)));
  4.  
  5. string hash =
  6. Convert.ToBase64String
  7. (new System.Security.Cryptography.MD5CryptoServiceProvider()
  8. .ComputeHash
  9. (System.Text.Encoding.UTF8.GetBytes
  10. (input)
  11. )
  12. );
  13.  
  14. token = __import__('md5').new(var1 + var2).hexdigest()
  15.  
  16. token = md5.new(var1 + var2).hexdigest()
  17.  
  18. hash = (new MD5).hash("some value")
  19.  
  20. Dim MD5 As New System.Security.Cryptography.MD5CryptoServiceProvider() : Dim HashBytes() As Byte : Dim MD5Str As String = "" : HashBytes = MD5.ComputeHash(System.Text.Encoding.UTF8.GetBytes("MyString")) : For i As Integer = 0 To HashBytes.Length - 1 : MD5Str &= HashBytes(i).ToString("x").PadLeft(2, "0") : Next
Add Comment
Please, Sign In to add comment