Month: March, 2007

MD5 in a few lines of Java

12 March, 2007 (10:58) | Cryptography, Java, Security, Snippets

1 import java.security.*;
2 import java.math.*;
3
4 public class MD5 {
5 public static void main(String args[]) throws Exception{
6 String s="This is a test";
[…]

Updating Linux systems for 2007 Daylight Savings Time changes.

5 March, 2007 (20:51) | Linux

This works on most systems. First download the updated DST packages:
wget ‘ftp://elsie.nci.nih.gov/pub/tz*.tar.gz’
Extract and compile the utilities:

tar -zxvvf tzco*
tar -zxvvf tzda*
make

Now compile the data:

mkdir temp
./zic -d temp northamerica

Verify the new data file is correct:

./zdump -v temp/EST5EDT | grep 2007
/etc/localtime Sun Mar 11 06:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 EST isdst=0
/etc/localtime […]