On Wednesday, March 2, 2016 at 7:58:31 PM UTC-5, Jeffrey Walton wrote: > > > > On Wednesday, March 2, 2016 at 10:52:44 AM UTC-5, Vasily Demidenok wrote: >> >> Hello list, >> >> I'm trying to use cryptopp for implementing small lib which will allow me >> to integrate with Android Pay. >> >> I have difficulties with loading private key into Crypto++ wich is >> mentioned in >> https://developers.google.com/android-pay/integration/gateway-processor-integration#using-openssl-to-generate-and-format-a-key >> >> private static final String MERCHANT_PRIVATE_KEY_PKCS8_BASE64 = >> "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgCPSuFr4iSIaQprjj" + >> "chHPyDu2NXFe0vDBoTpPkYaK9dehRANCAATnaFz/vQKuO90pxsINyVNWojabHfbx" + >> "9qIJ6uD7Q7ZSxmtyo/Ez3/o2kDT8g0pIdyVIYktCsq65VoQIDWSh2Bdm"; >> >> I tried it this way, using PEM_Load: >> >> string ecPriv = >> "-----BEGIN EC PRIVATE KEY-----\n" >> "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgCPSuFr4iSIaQprjj\n" >> "chHPyDu2NXFe0vDBoTpPkYaK9dehRANCAATnaFz/vQKuO90pxsINyVNWojabHfbx\n" >> "9qIJ6uD7Q7ZSxmtyo/Ez3/o2kDT8g0pIdyVIYktCsq65VoQIDWSh2Bdm\n" >> "-----END EC PRIVATE KEY-----\n"; >> >> > Ah, that's a PEM encoded PKCS #8 private key. The library only supports > BER and DER out-of-the-box. > > For PEM, you need a patch called the PEM Pack. You can find it at > http://www.cryptopp.com/wiki/PEM_Pack. > > Unzip it, and then recompile the library. Everything you need is picked up > automatically under Linux. Under Windows, you need to add the CPP files to > the cryptlib project. >
The website is down at the moment.... Email me off-list and I'll send you the ZIP file. noloader, gmail address. Jeff -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
