zoukankan      html  css  js  c++  java
  • poco库 RSA加解密

    #include "poco/Crypto/Cipher.h"
    #include "poco/Crypto/CipherFactory.h"
    #include "Poco/Crypto/RSAKey.h"
    using Poco::Crypto::Cipher;
    using Poco::Crypto::CipherFactory;
    using Poco::Crypto::RSAKey;


                Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL));
                std::string val("I love karen!");
                std::string enc = pCipher->encryptString(val);
                std::string dec = pCipher->decryptString(enc);
                std::cout << "加密后:" << enc << std::endl;
                std::cout << "解密后:" << dec << std::endl;

  • 相关阅读:
    算法市场 Algorithmia
    Cucumber
    TeamCity 持续集成工具
    自动化测试
    Selenium
    Android耗时操作
    RecyclerView
    Android报错
    Lakeshore
    BaaS_后端即服务 RESTful
  • 原文地址:https://www.cnblogs.com/xuandi/p/6881698.html
Copyright © 2011-2022 走看看