Yeah, just pulling the file source from the filename makes that almost impossible unless the decoder can pick it up ( I guess it can't by your experience). You can open the file as an istream, read until the header and then create the filesource from the istream object. You could also read the filesource until the header and then attach. There are probably fifty ways of doing it.
73,
Shawn[EMAIL PROTECTED] wrote:
-----Message d'origine----- De: Shawn Masters [mailto:[EMAIL PROTECTED] Date: vendredi 1 ao�t 2003 15:40 �: [EMAIL PROTECTED] Objet: Re: Key file and certificates
When a message or key material is Base64 encoded a simple header and footer is included to delineate the data from the rest of the text surrounding it (as in an email). Just cut the string at those points and move forward.
This is the last trick before I get everything working :-) I manage to load PKCS8 private key file, PEM encoded, with :
RSA::PrivateKey privkey; FileSource PrivKeyFile(PrivKeyFilename, true, new Base64Decoder); privkey.Load( PrivKeyFile);
As you said, the point is I have to jump over the header (the footer does not matter) to start reading the code directly on the second line. How should I do that ? File manipulation in CryptoPP are a dark mystery to me ...
Thanks, Regards
C�dric
