1

Any guides are all for Visial Studio 2015 or lower, I've tried following them but I haven't really gotten anywhere. I read the latest version of Crypto++ has been ported to work with Visual Studio 2017 so it should be possible. How shall I go about this?

The reason for me needing this is because I believe it's the easiest way to implement AES 128 bit. Is there a better (easier) way with the default libraries?

El-Chief
  • 383
  • 3
  • 15
  • If you don't mind working with Windows API there is AES128 there. In the example in [this link](https://learn.microsoft.com/en-us/windows/desktop/seccrypto/example-c-program-encrypting-a-file) replace `CALG_RC4` with `CALG_AES_128`, and see if it works for you. – Dialecticus Mar 01 '19 at 11:34
  • @Dialecticus Thank you, I certainly don't mind using Windows API but this looks really long and complex. I've only been learning c++ for the last 2-3 months. – El-Chief Mar 01 '19 at 11:44
  • @Dialecticus Whilst I agree in principal that using Win32 Crypto is a reaonsable soltuion, that example uses the old CryptoApi. Its throughly recommended, if you can, to use the 'new' CryptoAPI "Next Gen Crypto/CNG" https://learn.microsoft.com/en-gb/windows/desktop/SecCNG/cng-portal . I put 'new' in quotes there as CNG is over 12 years old now (!). See also https://www.codeguru.com/cpp/w-p/vista/article.php/c13813/Windows-Cryptography-API-Next-Generation-CNG.htm – Mike Vine Mar 01 '19 at 11:45
  • Any problems about using the provided cryptest.sln Solution with https://www.cryptopp.com/#download ? – andreaplanet Mar 01 '19 at 12:06
  • @andreaplanet Don't think so. Just not sure what to do with it. I opened it with VIsual Studio 2017 and clicked batch build (as said in a guide for an older vs), but I'm not sure what check boxes to tick. – El-Chief Mar 01 '19 at 12:23
  • @Krishi you can check all of them: cryptdll for building the dll, cryptlib for building the static library and crypttest for building the test program. You may check dlltest too. Or just do a Build Solution – andreaplanet Mar 01 '19 at 12:26
  • @andreaplanet so shall i build both the 32 bit and 64 bit ones or just the 64 bit ones? I mean the win32 or x64 platform. – El-Chief Mar 01 '19 at 16:58
  • Also, debug mode or release, or both? And which directories should I put the resulting files in? – El-Chief Mar 01 '19 at 17:39
  • Crypto++ does not install into Visual Studio. You build the library, and then you include the headers and link to the library in your project. It is the same procedure you use for any other library. Also see [Visual Studio](https://cryptopp.com/wiki/Visual_Studio) and [MSBuild (Command Line)](https://www.cryptopp.com/wiki/MSBuild_(Command_Line)) in the Crypto++ wiki. – jww Mar 01 '19 at 19:23
  • Possible duplicate of [How to add additional libraries to Visual Studio project?](https://stackoverflow.com/q/4445418/608639), [Compiling and linking third party libraries in VS 2015](https://stackoverflow.com/q/31030556/608639), [Compile and link 3rd party library in Visual Studio](https://stackoverflow.com/q/35008426/608639), etc. – jww Mar 02 '19 at 06:45

0 Answers0