Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

use-cryptopp.main.cpp 387B

1234567891011121314151617
  1. #include <cryptopp/osrng.h>
  2. #include <string>
  3. int main() {
  4. std::string arr;
  5. arr.resize(256);
  6. CryptoPP::OS_GenerateRandomBlock(false,
  7. reinterpret_cast<CryptoPP::byte*>(arr.data()),
  8. arr.size());
  9. for (auto b : arr) {
  10. if (b != '\x00') {
  11. return 0;
  12. }
  13. }
  14. return 1;
  15. }