Friday, 31 August 2007

Hash Algorithm - MD5

I like to share the hash algorithm called MD5, because when people are exposed to open-source software they will encounter this MD5 hash value. So what is it actually?

In cryptography, MD5 (Message-Digest algorithm 5) is a widely used cryptographic hash function with a 128-bit hash value. As an Internet standard (RFC 1321), MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of files. An MD5 hash is typically expressed as a 32-character hexadecimal number. (Ref: Wiki)

The above paragraph is the definition but what is so special about it? Ok, now I'm only interested in "integrity of files". You will notice that some open-source softwares come with MD5 hash value.

Here is a story when you don't make use of MD5 hash value.

1. You download a program from the internet, and that program includes a MD5 hash value.
2. But you just ignore the hash value... you try to install the program.. but fail at the middle of installation!!! (what a waste of time)
3. And you are still very stubborn, you want to make a second try!!! (again.. what a waste of time). Fail!!!
4. Now you just realise that the program you have downloaded is CORRUPTed. So you download a new one. Back to Square One.

Here is a story when you make use of MD5 hash value.

1. You download a program from the internet.. and you know the MD5 hash value.
2. After you download it, you check the program integrity using MD5 hash function and found out the output hash value is the same with the given one. Since it's equal.. obviously no problem (with confident), and no need to re-download the same program.
3. You install it... happy ending.

Enough of story!!! The moral of the story, you have to check the integrity of any files you download. This will tell whether the program is corrupted or not (maybe caused by fail transfer, virus, fake file, etc). This will also save you time.

There are many softwares out there that can check MD5 hash value, but I like to introduce Ash's MD5/SHA-1 Checker. (Princess Ashe~.. FFXII.. not relevant!!).

Proceed to the technical usage:-

1. Download the program here. (Current latest version is v0.9.7 and get md5-checker-0.9.7.exe for windows user).

The program md5 hash value is:-
aa4862b97b09f0bb8263bf7a82e885da

2. No installation required!!! Just run it as usual. Below is the program screenshot.



3. Try to check the program integrity itself. Click the "open file" dialog as shown in the above screenshot.



Once the file (e.g the program itself) is loaded, the hash value is generated automatically. As you can see in the screenshot above, the MD5 hash value is equal to the given one.

p/s: I don't know why this program uses the word checksum instead of hash value. Too many jargons!!

I will include md5 hash value for any program (if it has one) that I discuss in the future. Bah.

Thursday, 23 August 2007

WhatsNew - KoAgu v0.1a

KoAgu 0.1a

* Added: Scale Option -> bestFit + stretchToFit
* Fixed: Rescale issue, now only accept dimension lower than the original file
* Improved: N/A




I'll add/fix several features from time to time. Wait till the next release (dunno when, now I'm lazy :D)

Wednesday, 22 August 2007

KoAgu - First Version

I'm naming my thumbnail maker program as KoAgu... not so important!!! Ok la, just for a couple of hours I manage to get my program working using simple compression algorithm and only support jpg file at the moment. Here are the screenshots.

1. The Main Window



As you can see, there's Browse button to browse pics to be resized. I also provide rescale option where the two numbers are the pic dimension after rescaled. The first number is its width (e.g 400) and the second number is its height (e.g 300). By default I put "400 300" but users can change it as they wish.

Prefix is used to name the files that have been resized, e.g. if your original filename is "duolulu.jpg", and your prefix is "agu_", then the new filename will be "agu_duolulu.jpg". I included this feature in case user accidentally replace the original file.

2. After a user click Browse button, a pop-up window will appear. This allow the user to select "jpg" file to be processed. To select more than one file at a time.. hold the Ctrl key at the keyboard + select the chosen files.




3. Then finally, click the Process Now. Done!!! Check the new files inside the program directory.




You can download it here (get the bytecode). This program is not good enough. Ah.. what do you expect for a program that is written only for a few hours.. bah.

Tuesday, 21 August 2007

My Boring Project - Thumbnail Maker

I'm not quite busy these days, so why not creating a useful program (self-interest). Ah.. almost everyday I chat with my friend(s) in msn, and sometimes we exchange new photos (not self photos.. :D). Every photo has a size about 1++mb, so I usually resize each photo to reduce its size. Otherwise it will take a long time to transfer and prone to fail transfer.

Lame Problem
The problem is when I'm not exchanging for JUST one picture, but many!!! It will be time consuming if I open each picture, then resize, finally save as a new file. So I need a program that can resize and save all my photos at ONE go!!!

Lame Solution
Since I'm the one who need it so I have to program it myself.. :D

To Do List (Basic Features):-
- provide interface to browse file(s) to be resized
- resize settings e.g. new pic size.
- ...

For the time being, I'm going to implement it regardless the algorithm used. Ah.. as usual, I'm going to program it using JAVA.. no python.. no ruby.. hehe. So wait for the first version soon.. bah.