weidai11 / cryptopp

free C++ class library of cryptographic schemes
https://cryptopp.com
Other
4.67k stars 1.47k forks source link

Elimination of cryptest.vcxproj.user #1213

Closed irwir closed 1 year ago

irwir commented 1 year ago

This file is silently creataed by VS. In most cases such automatically generated files could be safely removed. Stackoverflow discussion includes MSDN link.

noloader commented 1 year ago

@irwir,

Agreed, but cryptest.vcxproj.user is special. It sets up the IDE for debugging:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <LocalDebuggerCommandArguments>v</LocalDebuggerCommandArguments>
  </PropertyGroup>
</Project>

With that option, pressing F5 causes cryptest.exe v to run, which executes the self tests. Without out that option, running cryptest.exe causes the program to exit with an error and the help message.

We're going to keep that one.

irwir commented 1 year ago

Thanks for the explanation. In that case the file has to stay and the issue to be closed. Additionally, running the cryptest solution in the current VS 2022 debug 64-bit build got this:

  1. Compiler warning

validat2.cpp(1177,69): warning C4244: 'argument': conversion from 'CryptoPP::word' to 'long', possible loss of data

  1. Quite a few asserts. Is this by design? The first one:

Assertion failed: cryptopp-master\integer.cpp(4451): CryptoPP::a_times_b_mod_c

irwir commented 1 year ago

Total number of fired asserts is several dozens - such as zero values or empty strings. Of course, these would be seen only in debug builds.