Posts Tagged Visual Studio .Net 2005

How to calculate password hash in C# for Jira users?

While I’m working on migrating our current issue tracking system to the new Jira instance I needed to manually create new users in Jira’s database. The users are stored in the userbase table, but when you take a look you’ll see that the password is not stored instead there is a column called “PASSWORD_HASH” which contains the password in a hashed form. Since Jira uses the OSUser package from OpenSymphony you can go and look in the code.

The code that Jira uses to create the password hash is the following in Java:


private String createHash(String original) {
   byte[] digested = PasswordDigester.digest(original.getBytes());
   byte[] encoded = Base64.encode(digested);

   return new String(encoded);
}

Now here you a digest being generated from the original value. Well this is a SHA-1/512 hash which is then converted to a Base64 representation and that’s all!

Okay here is how you can do this in C#:


using System;
using System.Text;
using System.Security.Cryptography;

public sealed class JiraPasswordHasher
{

    public static string createHash(string original)
    {
        SHA512 shaM = new SHA512Managed();
        var result = shaM.ComputeHash(System.Text.Encoding.ASCII.GetBytes(original));

        return Convert.ToBase64String(result);

    }
}

Have fun!

, , , , , , , , , ,

1 Comment

TfsProxy on codeplex shutdown

Today I received a message from codeplex telling me that I needed to publish my tfsproxy project on codeplex. I tried doing that but it won’t let me because I didn’t had any source code in the tfs servers. So I decided to let the project get closed on May 1 2009.

For those that are still looking for the code You can find it here on my skydrive folder.

http://cid-81c1c1a3ae5a0b08.skydrive.live.com/self.aspx/TfsProxy

,

1 Comment

Get a history of the evolution to LINQ

 Anson Horton wrote a very nice article for the MSDN magazine June 2007 edition. It gives you an overview of how LINQ (Language Integrated Query) has evolved from the idea of the concept to an actual technology. A nice extra on this article is that he shows a lot which new language features in C# 3.0 made it actually possible to come to version on LINQ we have now. It’s thanks to Lambda Expressions, Extension Methods, Anonymous Type, Implicitly Type Local Variables, Object Intitializers and Query expressions that LINQ can offer you a very nice language enhancement to query for example objects, dataset, xml, …

Check it out at:
http://msdn.microsoft.com/msdnmag/issues/07/06/csharp30/default.aspx

,

1 Comment

Hey I thought I saw a CAB Pattern?!? Yeah, yeah I did see a CAB Pattern !!!!

 Glenn Block wrote a comparison of the new Microsoft Codename “Acropolis” and SCSF/CAB. If you take a look you’ll immediate notice some similarities or perhaps the logical evolution of SCSF for applications that support the new “stuff” like WPF, WF and so on… Check it out if you like the CAB concept you will definitely like Acropolis!!!


,

No Comments

Dynamic Data Controls (ASP.NET Futures CTP)

If you want a small introduction for the dynamic data controls that exist in the ASP.NET Futures CTP. You can watch the webcast below:

No Comments

Get started with Expression Blend and Design

logoF or those that like to get started with the new Microsoft products Expression Blend and Expression Design. You should check out these links below. They give you access to tons of FREE video tutorials hosted by lynda.com

Links:
- Getting started with Expression Blend

In Getting Started with Expression Blend , Lee Brimelow covers all the basics that every designer and developer of WPF and Silverlight content needs to know. He starts with an overview of how Expression Blend fits into WPF and Silverlight workflows, then guides viewers through the process of creating and manipulating objects, building timeline-based animations, and exporting compositions into XMAL for use in Visual Studio.

- Getting started with Expression Design

From basic vector-based drawings to professional three-dimensional graphics built with Live Effects, Ted LoCascio covers the full range of possibilities in Getting Started with Expression Design. He starts by explaining Expression Design’s interface and how to work with documents, then moves on to cover working with objects and applying fills, strokes, and effects for best results. Exercise files accompany this training.

Enjoy!

note: the lynda.com logo is protected by copyrights. Suddenelfilio.net is not in any way affiliated with lynda.com or any of its partners.

, , ,

No Comments

Code Style Enforcer

 Code Style Enforcer is a DXCore plug-in for Visual Studio 2005 that checks the code against a configurable code standard and best practices. It is developed for C#, but some of the rules will also work for VB .NET, though not tested.

You can create your own design rules to which everybody needs to comply. This very nice if you want to enforce certain coding standards.

No Comments

Windowsclient.net New Microsoft Community Site

As you can read on the home page:

The WindowsClient.NET Community Site Launches

Welcome to WindowsClient.net, the community learning resource for Windows Forms and Windows Presentation Foundation.

This site focuses on all aspects of rich client development on Windows using the .NET Framework. New content from both the Microsoft product teams and from the community will be added regularly to highlight the many user experience and developer productivity benefits of rich client applications on Windows.

Everytime they launch a new site I’m amazed by the looks and the ease to navigate it. They really put in an effort to make their sites look-a-like.

,

No Comments

FileBrowser Control For Windows Mobile 6.0 Released

I’ve released the source code of the FileBrowser Control. Check the projects section!

No Comments

MSDN Webcast on unit testing

Since I had to look for this at work for a co-worker of mine I decided to share it. Because it’s actually an on-demand webcast which requires you to register and so on…

To save you all that hassle the webcast can be downloaded from this post.

[display_podcast]

, ,

No Comments