How to use GnuPG to generate sha512sum hash?

Moses moses.mason at
Fri Aug 31 13:16:02 CEST 2007

Hash: SHA1


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, or

e.g. for "AAA",
web based SHA1 result is:
, and SHA512 result is:

Version: GnuPG v1.4.3 (MingW32)


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> 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:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The best cure for insomnia is to get a lot of sleep.
>     -- W.C. Fields
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at

"I may not agree with what you say but I will defend to the death your
right to say it"

More information about the Gnupg-users mailing list