How to use GnuPG to generate sha512sum hash?

Moses moses.mason at gmail.com
Fri Aug 31 13:22:00 CEST 2007


Hi,

(Sorry for last mail, FireGPG truncated my mail...so here it should be)

Thank you for your reply, it works. But hash results that I got from
GPG is different from some web based hash calculator, such as,
http://www.johnmaguire.us/tools/hashcalc/ or
http://people.eku.edu/styere/Encrypt/JS-SHA1.html

e.g. for "AAA",
web based SHA1 result is:
606ec6e9bd8a8ff2ad14e5fade3f264471e82251
, and SHA512 result is:
8d708d18b54df3962d696f069ad42dad7762b5d4d3c97ee5fa2dae0673ed46545164c078b8db3d59c4b96020e4316f17bb3d91bf1f6bc0896bbe75416eb8c385

but GPG's result is:
> echo AAA | gpg --print-md SHA1
1AE0 9EE3 43FA 9C61 8DE7  C5C1 770E F4E4 90B2 4ADA

> echo AAA | gpg --print-md SHA512
1CD99029 6017D85F 8B909505 21AE360D C8D907C3 A09B14AB 5B273F85
7BC2F166 B90B3889 07DF7A7C A383D585 D555F383 92B1101E 0A2B1829
0D966F54 25036FDB

Due to I have try more than one web-based cryptographic hash
calculator. I don't think online results are wrong. All of them
generates the same results except GPG.

Did I miss something? Or it's a issue of my GPG installation?


Best regards.








On 8/31/07, Todd Zullinger <tmz at pobox.com> wrote:
> Moses wrote:
> > I want hash some strings by using GnuPG, I know GPG have hash
> > function, but I can't find how to do it in the manuals or other
> > documentations on the official website. What's parameters used by
> > GPG for hash?
> >
> > Furthermore, I would like use sha-512 hash strings from standard
> > input, rather than from files, is it possible? If not, is there any
> > other app can do this for me?
>
> Perhaps this:
>
> echo "some string" | gpg --print-md SHA512
>
> is what you're looking for?
>
> --
> Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The best cure for insomnia is to get a lot of sleep.
>     -- W.C. Fields
>
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>
>
>



More information about the Gnupg-users mailing list