Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. #include "cryptopp/modes.h"
  5. #include "cryptopp/speck.h"
  6. #include "cryptopp/filters.h"
  7.  
  8. int main(int argc, char* argv[]) {
  9. CryptoPP::SPECK128::Encryption speck;
  10.  
  11. std::cout << "StaticAlgorithmName: " << speck.StaticAlgorithmName() << std::endl;
  12. std::cout << "AlgorithmName (unkeyed): " << speck.AlgorithmName() << std::endl;
  13.  
  14. CryptoPP::byte key[CryptoPP::SPECK128::DEFAULT_KEYLENGTH] = {};
  15. speck.SetKey(key, sizeof(key));
  16.  
  17. std::cout << "AlgorithmName (keyed): " << speck.AlgorithmName() << std::endl;
  18.  
  19. return 0;
  20. }
  21.  
  22. StaticAlgorithmName: SPECK-128
  23. AlgorithmName (unkeyed): SPECK-128
  24. AlgorithmName (keyed): SPECK-128(128)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement