user@UbuntuX:~/mipt$ g++ main.cpp -o crypto_app -lcryptopp
main.cpp: In function ‘void testAES()’:
main.cpp:18:5: error: reference to ‘byte’ is ambiguous
18 | byte key[AES::DEFAULT_KEYLENGTH];
| ^~~~
In file included from /usr/include/crypto++/config.h:27,
from /usr/include/crypto++/seckey.h:9,
from /usr/include/crypto++/rijndael.h:13,
from /usr/include/crypto++/aes.h:13,
from main.cpp:3:
/usr/include/crypto++/config_int.h:66:23: note: candidates are: ‘typedef unsigned char CryptoPP::byte’
66 | typedef unsigned char byte;
| ^~~~
In file included from /usr/include/c++/15/bits/memory_resource.h:40,
from /usr/include/c++/15/string:72,
from /usr/include/c++/15/bits/locale_classes.h:42,
from /usr/include/c++/15/bits/ios_base.h:43,
from /usr/include/c++/15/ios:46,
from /usr/include/c++/15/bits/ostream.h:43,
from /usr/include/c++/15/ostream:42,
from /usr/include/c++/15/iostream:43,
from main.cpp:1:
/usr/include/c++/15/cstddef:75:14: note: ‘enum class std::byte’
75 | enum class byte : unsigned char {};
| ^~~~
main.cpp:19:24: error: ‘key’ was not declared in this scope; did you mean ‘key_t’?
19 | prng.GenerateBlock(key, sizeof(key));
| ^~~
| key_t
main.cpp:20:5: error: reference to ‘byte’ is ambiguous
20 | byte iv[AES::BLOCKSIZE];
| ^~~~
/usr/include/crypto++/config_int.h:66:23: note: candidates are: ‘typedef unsigned char CryptoPP::byte’
66 | typedef unsigned char byte;
| ^~~~
/usr/include/c++/15/cstddef:75:14: note: ‘enum class std::byte’
75 | enum class byte : unsigned char {};
| ^~~~
main.cpp:21:24: error: ‘iv’ was not declared in this scope; did you mean ‘div’?
21 | prng.GenerateBlock(iv, sizeof(iv));
| ^~
| div
user@UbuntuX:~/mipt$