[Nottingham] 1GB of \0 (aka null)
Duncan John Fyfe
djf at star.le.ac.uk
Mon Mar 27 14:45:47 BST 2006
On Mon, 2006-03-27 at 14:30 +0100, Martin wrote:
> Richard Hayes wrote:
> [---]
> > I'm doing some online Linux proficiency tests, and one of the questions
> > is:
>
> 'Ere! Are we doing your homework for you?
> Do we get a share of the prize? ;-)
>
> > Calculate the sha1sum hash of 1GB of \0 characters (aka zeros, nulls etc).
> >
> > That's the whole question! They're all quite tricky, in their actual
> > difficulty
> > and their ambiguity.
I think your ambiguity is ambiguous :)
>
> Oh. That one's easy:
>
> dd if=/dev/zero count=2M | sha1sum
>
> 2a492f15396a6768bcbca016993f4b4c8b0b5307
>
> Now, whom can answer that in fewer characters and how?
Not shorter, but faster:
dd if=/dev/zero count=131072 bs=8192 | sha1sum
Have fun,
Duncan
More information about the Nottingham
mailing list