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;

  • 相关阅读:
    Vue单向数据流
    npm常用命令
    vue自定义指令
    slot的用法(Vue插槽)
    js闭包
    canvas 给画的多边形着色
    canvas画线
    canvas初体验
    canvas
    json
  • 原文地址:https://www.cnblogs.com/xuandi/p/6881698.html
Copyright © 2011-2022 走看看