How to Determine Digest Algorithm

Patrick Brunschwig patrick at mozilla-enigmail.org
Tue Dec 19 09:33:25 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm trying to find a good way to determine the digest algorithm that
GnuPG uses for a signed message. My problem is this: for PGP/MIME signed
messages, I need to know the algorithm before the message is created.
Therefore I create a signed dummy message, and extract from it the hash
algorithm. However, the problem is that this requires the user to type
the passphrase twice, which I would like to avoid.

Is there a better way to determine the hash algorithm without actually
creating a signed message?

Thanks,
Patrick
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBRYejz3cOpHodsOiwAQL5HQgAhuew2yehTH1M57rFAPWinGU3IKMHH/5k
oh86sv45N0YqQJH8CyErnKwNqQCaAuozi4ij3duN3gmzJBRT9+t4BHKqQXyf7ZSw
cYutIhrHGhvCtyosx/fpSe5p7VjN4uU+XwyDwM4pDlVirVrhdEn3zojqtUUhZn5g
ESvp7xcNecF5j8q557Bzsw9dIsET94OusQ/PifWmZJ8JuVyEsB952N6GpZ7RLic3
5+4KIr2c8wxbSX+CGCxDZuSUwBBde5OhRU7BHpCtFu7gUkyWRckefc/nQwhJxVgx
Q0b0jzhUFGL7BNPccUCDX3geW85y6s2Thg44JGPKT+jZN3Lc011ucA==
=3IvX
-----END PGP SIGNATURE-----



More information about the Gnupg-devel mailing list