SHARE
TWEET

Untitled

a guest Jun 27th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top