Sunday, January 16, 2005

md5sum and sha1sum of zeros

The file size is 10737418240.
% dd if=/dev/zero of=ztest bs=1k count=10M
10485760+0 records in
10485760+0 records out
% md5sum /tmp/ztest
2dd26c4d4799ebd29fa31e48d49e8e53  /tmp/ztest
% sha1sum /tmp/ztest
a0b6e2ca4e28360a929943e8eb966f703a69dc44  /tmp/ztest
Now, with 2,000,000,000 byte files (avoiding the maximum file size limitation):
% dd if=/dev/zero bs=1000 count=2000000 | md5sum
2000000+0 records in
2000000+0 records out
5ab9550b6548d740cc7713661f22e9af  -
% dd if=/dev/zero bs=1000 count=2000000 | sha1sum
2000000+0 records in
2000000+0 records out
752ef2367f479e79e4f0cded9c270c2890506ab0  -

No comments :