New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test C++17 byte change with dry runs from various projects #442
Comments
Here are the results from Pycryptopp. It appears Pycryptopp did not import the entire Pycryptopp needed the following due to the upcoming Crypto++ changes. The changes made to Pycryptopp are compatible with the old version (
|
Hi @noloader. I've been watching this byte issue unfold and we remain unaffected. Thank you for the ping 😄 |
The change was checked in at Commit 00f9818b5d8e5aeb. |
…(Issue 447) This seems to be a little cleaner than the triage at 00e1337 commit.
Changes the crypto module to use unsigned char instead of byte. The byte typedef is no longer included in the global namespace in crypto++ 6.0.0. See weidai11/cryptopp#442. Fixes #184.
I'd like to use this issue to track some dry runs of the proposed change due to C++17,
std::byte
and collisions with Crypto++byte
. We've tested the change with toy programs, and we would like to solicit feedback from real projects using Crypto++.The 3 second tour is as follows. From 10,000 feet, Crypto++ plans on moving
byte
from the global namespace into the Crypto++ namespace. The move creates a void in user programs, and it can be filled by (1) usingCryptoPP::byte
instead ofbyte
; (2)using byte = CryptoPP::byte;
(C++11 and above); or (3)typedef unsigned char byte;
(C++03 and above). If possible, you should use (3) - supply your own typedef.apt-get install gcc-7 g++-7
-std=c++17
-std=c++17
(will be OK)-std=c++17
(report your problems)For item (4), Build Crypto++ library with
-std=c++17
, perform the following:CRYPTOPP_NO_GLOBAL_BYTE
is a convenience item for those supporting multiple versions of Crypto++. It is really only needed for the gap between the 5.6.5 release and the 6.0 release because Master currently uses#define CRYPTOPP_VERSION 600
. But signalling it through a define is painless. Related, see Release Versioning | Post-Release Increment on the Crypto++ wiki.Please report problems and work-arounds below. If you had problems, please state if it was due to
using namespace std;
. Work-arounds are suggested at std::byte | Fixing Programs on the Crypto++ wiki.Here are folks who may be able to help with the dry run. Listing their name generates the GitHub notification. The names were gathered from a GitHub search for projects with activity in 2016 and 2017. @anonimal, @swarren, @mmoss, @zooko, @huahang, @prakhs123, @pld-linux, @sechaser, @elementrem, @xItsMe, @Mowje, @NickNaso, @cawka, @wyrover, @vunguyenthe, @vster, @alphaemmeo, @smasherprog, @pschord, @psforever, @harrywye, @vcpkgs, @tpgxyz, @luofujie, @badforlabor, @smasherprog, @riebl, @DonAlonzo, @amani-lei, @xy12423, @Cyberunner23, @Xiao-Chong, @coderChenY, @familyld, @firngrod, @tcolligan-ap, @dotman14, @reganheath, @motioncity, @MarcelRaad, @DevJPM, @mouse07410, @denisbider, @gcsideal, @buildroot-auto-update, @woodsts, @snickl.
If you need to update your Crypto++ clone, then issue
git pull
. If you need to reset your Crypto++ clone to upstream/master, then seereset-fork.sh
provided in Crypto++ Master.The change to accommodate C++17 and
std::byte
will be available in Master and eventually Crypto++ 6.0. The change requires a major version bump.For documentation purposes, see the following on the Crypto++ User mailing list:
The text was updated successfully, but these errors were encountered: