Re: Bug in Debian
Adam Back <[email protected]> Tue, 22 Mar 2011 12:35:41 +0100
| Newsgroups | gmane.mail.spam.hashcash |
|---|---|
| Message-ID | <[email protected]> |
Ah you know that repros for me, and it is the syntax given in some of the
man page examples.
> $ hashcash -m foo -b 30 -Z 2
> hashcash token: 1:20:110321:foo::D98FQryEx9gxON+9:82nc
I was thinking huh? surely that cant have been broken for so long, however
finally I twigged the problem.. the command line arguments are positional,
you have to give some options that affect the mint before the
-m... eg
hashcash -b 30 -m foo -Z 2
(-Z works after, -b doesnt... because -Z is global and -b is relative to
this mint).
Its because you can intentionally do multiple things like and the bits
argument applies to the right.
hashcash -b 10 -m foo -b 15 -m bar taz -Z2
I'm afraid I got bit carried away with the command line parsing with
advanced features, with some gotcha side effects.
I need to update the documentation to give correct examples, and maybe warn
about this gotcha.
Adam
On Mon, Mar 21, 2011 at 03:31:14PM -0600, Aaron Toponce wrote:
>I submitted a the following bug to the Debian bug tracker:
>
>http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619183
>
>Does anyone else have the same problem, or am I doing it wrong? For
>example:
>
> $ hashcash -m foo -b 30 -Z 2
> hashcash token: 1:20:110321:foo::D98FQryEx9gxON+9:82nc
>
>It is no 30 bits, as the 2nd field shows, and verifying it with SHA1
>shows such:
>
> $ echo -n 1:20:110321:foo::D98FQryEx9gxON+9:82nc | sha1sum
> 00000b8fc2f1b82dbda883499d9ed9c8e30f130e -
>
>Has anyone else seen this problem?