Visual Studio Feeds English |
- How to Get a Developer License for Windows 8 App Development
- Windows 8 mail app
- Windows 8, actually.
- Near-Earth Object Flypast at 00:00 on 15/June!
- Spring is over
- Nightly news, 15 Jun 2012
- Create iPad-style Web Apps using DevExpress ASP.NET with DXperience v12.1
- Salt and hash a password in .NET
- Warning CS1591: Missing XML comment
- The canvas element – Basic usage
| How to Get a Developer License for Windows 8 App Development Posted: 14 Jun 2012 02:24 PM PDT |
| Posted: 14 Jun 2012 12:38 PM PDT |
| Posted: 14 Jun 2012 12:38 PM PDT |
| Near-Earth Object Flypast at 00:00 on 15/June! Posted: 14 Jun 2012 11:22 AM PDT |
| Posted: 14 Jun 2012 11:22 AM PDT |
| Posted: 14 Jun 2012 09:35 AM PDT |
| Create iPad-style Web Apps using DevExpress ASP.NET with DXperience v12.1 Posted: 14 Jun 2012 09:05 AM PDT |
| Salt and hash a password in .NET Posted: 14 Jun 2012 09:05 AM PDT I endeavoured to follow the CrackStation rules: Salted Password Hashing Doing it Right (http://crackstation.net/hashing-security.htm) public class SaltedHash { public string Hash { get; private set; } public string Salt { get; private set; } public SaltedHash(string password) { var saltBytes = new byte[32]; new RNGCryptoServiceProvider().GetNonZeroBytes(saltBytes); Salt = ConvertToBase64String(saltBytes); var passwordAndSaltBytes = Concat(password, saltBytes); Hash = ComputeHash(passwordAndSaltBytes); } static string ConvertToBase64String(byte[] bytes) { return Convert.ToBase64String(bytes); } static string ComputeHash(byte[] bytes) { return ConvertToBase64String(SHA256.Create().ComputeHash(bytes)); } static byte[] Concat(string password, byte[] saltBytes) { var passwordBytes = Encoding.UTF8.GetBytes(password); return passwordBytes.Concat(saltBytes).ToArray(); } public static bool Verify(string salt, string hash, string password) { var saltBytes = Convert.FromBase64String(salt); var passwordAndSaltBytes = Concat(password, saltBytes); var hashAttempt = ComputeHash(passwordAndSaltBytes); return hash == hashAttempt; } } ... |
| Warning CS1591: Missing XML comment Posted: 14 Jun 2012 09:05 AM PDT |
| The canvas element – Basic usage Posted: 14 Jun 2012 06:33 AM PDT |
| You are subscribed to email updates from VSF RSS English To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
| Google Inc., 20 West Kinzie, Chicago IL USA 60610 | |
Комментариев нет:
Отправить комментарий