cdauth/node-pgp — pull request #7 by pferreir (2013-08-04 17:17:20+00:00)
Title: Added support for public keys, change fingerprinting code

I've added support for private keys. It basically employs the same methods that were being used for public keys.

I've also changed the fingerprinting code, since RFC 480 states that:

> A V4 fingerprint is the 160-bit SHA-1 hash of the octet 0x99, followed by the two-octet packet length, followed by the entire Public-Key packet starting with the version field."

This apparently means that, in the case of a private key packet, all additional content should be ignored. Right now, fingerprints are being calculated taking the full key content into account (probably because until now only public keys were allowed). So, this patch should change that.