Advertisement
Guest User

Crypto++ SHA256

a guest
Feb 5th, 2015
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. std::string password(const std::string& string)
  2. {
  3.     CryptoPP::SHA256 hash;
  4.     std::string encodedString;
  5.  
  6.     CryptoPP::StringSource(string, true, new CryptoPP::HashFilter(
  7.         hash, new CryptoPP::HexEncoder(
  8.             new CryptoPP::StringSink(
  9.                 encodedString
  10.             ), false
  11.         )
  12.     ));
  13.  
  14.     return encodedString;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement