Click here to Skip to main content
6,822,123 members and growing! (18,602 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » Mobile Development » General     Intermediate License: The GNU General Public License (GPL)

Password Safe Reader for Windows Mobile

By Svante Seleborg, Alphons van der Heijden, Dave Shaw, katakana2

A Windows Mobile C# reader for the popular Password Safe archive files
C#, WinMobile (PocketPC-2002, WinMobile2003, WinMobile5, WinMobile6), .NETCF, PalmOS, J2ME, iPhone, Android, Blackberry, Visual-Studio (VS2008), ADO.NET, WinForms, SQL-CE
Revision:8 (See All)
Posted:16 Mar 2009
Updated:21 Apr 2009
Views:10,742
Bookmarked:17 times
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
3 votes for this article.
Popularity: 2.25 Rating: 4.71 out of 5

1

2
1 vote, 33.3%
3

4
2 votes, 66.7%
5

Introduction

For a long time, we have been using the excellent Password Safe (referred forward as PS) program for storing the countless passwords necessary in today's life. But a lot of time we are not at the computer where our PS database is and we really need that password. Using the excellent work of Svante Seleborg (who made the PS Reader library for Windows XP/Vista) and Alphons (who modified it in order to work on Windows Mobile), I created a GUI around that library, which I also optimized a little for fast search. 

Background

The program requires .NET Compact Framework 3.5 and of course Windows Mobile (2003, 5, 6).  The program is at its very beginning: the PS archive must be named exactly pass.psafe3 and be placed in My Documents in root directory of the device (not in Internal Storage, SDMMC, Storage Card, etc). It is also possible to sync this file very easily with the file on the computer.

Using the Code 

Svante made the original Password Safe Reader library, so most of the hard work is described in his article. Alphons modified the library in order to work on the Windows Mobile OS. I made the GUI which works like this: after program load click Open File and the program will fill a DataGrid bound using Binding Source from ADO.NET. As soon as you type anything in the textbox, the DataGrid will be filtered real-time, and with pretty good performance.

After that you can click on individual rows to display on the upper part the User and Password. The reason for this is because sometimes the passwords can be pretty long and hard to read on the DataGrid control.

Also, the program stores in registry the password for the file in order to avoid asking for it everytime. If you feel your device can get into the wrong hands, you can use Reset password option from the Password menu.

The code is very alpha at best by my standards, but works ok if the necessary conditions are met. Take into consideration that in the GUI try-catch blocks are almost non existent.

Points of Interest 

  1. There is really limited real estate screen on a Windows Mobile App! You really need to be creative and be very efficient in order to have a useful application which won't require to pull out the stylus.
  2. The MSDN Library has incomplete information about .NET Compact Framework. When you want help for the DataGrid you get the information for the Windows version and a lot of the examples there don't apply. In the limited time (3 hours) I made the GUI, I didn't find an autoresize method for columns and a Rows collection of Datagrid.
  3. The program can only read PS files. First of all, this is because I don't have the time to make a Writer Library. Common sense tells me that this can be made easily now. Be aware of sync problems if anyone thinks of starting work on this - what will happen when you have a new version on the device but ActiveSync is setup to replace the version on Device? Second, I don't think there is much use for this. Most of the time you make accounts on the PC/Laptop, not on the Device and you use the official PS program.

History

  • V1.0 - Initial release

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPL)

About the Authors

Svante Seleborg


Member
I've been working with all aspects of software development since 1979 - from compiler construction to management. Currently I'm an independent consultant mostly specializing in computer security. Please see my homepage for contact details.

I speak C like a native, and have a pretty good grasp of C++. Traditionally Unix has been the dominating environment, but currently the scales have tipped over to Windows, due to market demands but I'm equally at home developing in both environments.

When I'm not coding I'm usually sitting on one of my 4 bikes, indoors or outdoors, on the road or in the woods.
Occupation: Web Developer
Location: Sweden Sweden

Alphons van der Heijden


Member
I'm Alphons van der Heijden, living in Helmond, Netherlands, Europa, Earth. And currently I'm retiring from hard working, owning my own company. Because I'm full of energy, and a little to young to relax ...., I don't sit down, but create and recreate software solutions, that I like. Reinventing the wheel is my second nature. My interest is in the area of Internet technologies, .NET etc. I was there in 1992 when Mosaic came out, and from that point, my life changed dramatically, and so did the world, in fact. (Y)
Occupation: Other
Location: Netherlands Netherlands

Dave Shaw


Member
I am currently employed as a C# / MS SQL developer for a Medical Software company working on a large enterprise system.

I have used Delphi and MSM MUMPS in previous roles and love both languages.

I'm an avid Windows Mobile fan and moderator on http://xda-developers.com. I code in C#, and C++ for WM as well as cooking custom ROMs and learning to disasm the inners of my device.
Occupation: Software Developer
Location: United Kingdom United Kingdom

katakana2


Member
I have some small but intensive experience with C#, ASP.NET and Delphi. Also I like to write API's, which I realized when I made a SmartCard library. Now I don't work anymore as a programmer, but as a medical applications specialist and in my free time I enjoy making little useful programs and reading about the newest technologies.
Occupation: Engineer
Location: Romania Romania

Other popular Mobile Development articles:

  • Writing Your Own GPS Applications: Part 2
    In part two of the series, the author of "GPS.NET" teaches developers how to write GPS applications suitable for the real world by mastering GPS precision concepts. Source code includes a working NMEA interpreter and sample high-precision application in C# and VB.NET.
  • Writing Your Own GPS Applications: Part I
    What is it that GPS applications need to be good enough to use for in-car navigation? Also, how does the process of interpreting GPS data actually work? In this three-part series, I will cover both topics and give you the skills you need to write a commercial-grade GPS application.
  • Learn How to Find GPS Location on Any SmartPhone, and Then Make it Relevant
    A step by step tutorial for getting GPS from any SmartPhone, even without GPS built in, and then making location useful.
  • Windows Mobile, iPhone, Android - Marketplace Comparison
    Detailed comparison between Windows Mobile Marketplace, Apple's iPhone AppStore and Android Market from developer point of view.
  • iPhone UI in Windows Mobile
    It's an interface that works with transparency effects. As a sample I used an interface just like the iPhone one. In this tutorial I am explaining how simple is working with transparency on Windows Mobile.
Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 7 of 7 (Total in Forum: 7) (Refresh)FirstPrevNext
QuestionViewer PS WM 6.1 ready for use available ? PinmemberGremillet2:49 30 Sep '09  
GeneralUpdates PinmemberDave Shaw23:47 20 Apr '09  
GeneralRe: Updates Pinmemberkatakana20:34 21 Apr '09  
GeneralRe: Updates PinmemberDave Shaw3:17 21 Apr '09  
GeneralRe: Updates Pinmemberkatakana24:45 21 Apr '09  
GeneralRe: Updates PinmemberDave Shaw4:59 21 Apr '09  
GeneralNotSupportedException Pinmemberdigger697:43 24 Mar '09  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads.

PermaLink | Privacy | Terms of Use
Last Updated: 21 Apr 2009
Editor: Sean Ewington
Copyright 2009 by Svante Seleborg, Alphons van der Heijden, Dave Shaw, katakana2
Everything else Copyright © CodeProject, 1999-2010
Web20 | Advertise on the Code Project