It took me a long time to figure out that I was getting a BERDecodeErr when 
loading a private key from a file because it had been encoded with 
"->DEREncode()" and was getting decoded with "->BERDecodeKey()".

I have a couple of questions:

1.  What is the difference between the two encodings?  An in-line comment 
(quoted below) suggests maybe the "EncodeKey()" variant is X509 spec?

2.  A meta-issue: where will documentation which explains such issues 
ultimately live?  In richer in-line comments?  In Denis Bider's tutorial?  The 
auto-FAQ?  What's is your grand plan, Wei, for Crypto++ doc as Crypto++ 
becomes more widely used?  (About which more in a separate message.)

Regards,

Zooko

------- begin excerpt from rsa.h:
        // X509PublicKey
        OID GetAlgorithmID() const;
        void BERDecodeKey(BufferedTransformation &bt);
        void DEREncodeKey(BufferedTransformation &bt) const;
------- end excerpt from rsa.h:


Reply via email to