首页 文章 精选 留言 我的

精选列表

搜索[加密工具],共10000篇文章
优秀的个人博客,低调大师

酷瓜云课堂 v1.3.8 发布,不加密不阉割,可免费商用

v1.3.8(2021-07-12) 更新内容 更正 readme 中 github 仓库信息 增加清除点播地址缓存命令 若干缓存键名重命名 后台站点名称修改为用户站点名称 标签名称比较忽略大小写 重新设计前后台登录界面 更正后台存储设置中图片样式的参数描述 记录逻辑删除后浏览重定向到 404 修正图文类型的章节 markdown 解析问题 优化文章和提问不必要的标签数据提交 图文中图片增加点击放大预览功能 各数据结构中增加若干业务字段 COS 存储中去除多余的年月目录结构 清理优化 css 修正直播地址问题 修正评论审核路由问题 修正取消收藏问题 项目介绍 酷瓜云课堂,依托腾讯云基础服务架构,采用 C 扩展框架 Phalcon 开发,GPL-2.0 开源协议,致力开源网课系统,开源网校系统,开源知识付费系统。 系统功能 实现了点播、直播、专栏、面授、会员、群组、积分、秒杀等,100% 真开源在线教育解决方案,可以免费商用。 托管仓库 gitee 仓库 github 仓库 意见反馈 在线反馈(推荐) 官方论坛(推荐) 开源助力 毫无保留的真开源不容易,如果对你有帮助,请给我们STAR!!!

优秀的个人博客,低调大师

Windows10 VS2017 C++使用crypto++库加密解密(AES)

版权声明:本文可能为博主原创文章,若标明出处可随便转载。 https://blog.csdn.net/Jailman/article/details/85262234 参考文章:https://blog.csdn.net/tangcaijun/article/details/42110319 首先下载库:https://www.cryptopp.com/#download 使用vs2017打开cryptest.sln文件,解决方案选择“重订解决方案目标”,升级sdk。 编译库和dll文件 将生成的cryptopp.lib和cryptopp.dll放到项目文件夹,如果单独运行需要将dll文件拷贝到debug文件夹和生成的exe文件放在一起使用。 新建win32 c++控制台程序,工程->配置属性->vc++目录->包含目录,填写cryptopp的目录,需要使用其中的头文件. 编码: #include "pch.h" #include <iostream> #include <fstream> #include <aes.h> #include <filters.h> #include <modes.h> #include <Windows.h> #pragma comment(lib, "cryptopp.lib") using namespace std; byte key[CryptoPP::AES::DEFAULT_KEYLENGTH], iv[CryptoPP::AES::BLOCKSIZE]; void initKV() { memset(key, 0x00, CryptoPP::AES::DEFAULT_KEYLENGTH); memset(iv, 0x00, CryptoPP::AES::BLOCKSIZE); // 或者也可以 /* char tmpK[] = "1234567890123456"; char tmpIV[] = "1234567890123456"; for (int j = 0; j < CryptoPP::AES::DEFAULT_KEYLENGTH; ++j) { key[j] = tmpK[j]; } for (int i = 0; i < CryptoPP::AES::BLOCKSIZE; ++i) { iv[i] = tmpIV[i]; } */ } string encrypt(string plainText) { string cipherText; // CryptoPP::AES::Encryption aesEncryption(key, CryptoPP::AES::DEFAULT_KEYLENGTH); CryptoPP::CBC_Mode_ExternalCipher::Encryption cbcEncryption(aesEncryption, iv); CryptoPP::StreamTransformationFilter stfEncryptor(cbcEncryption, new CryptoPP::StringSink(cipherText)); stfEncryptor.Put(reinterpret_cast<const unsigned char*>(plainText.c_str()), plainText.length() + 1); stfEncryptor.MessageEnd(); string cipherTextHex; for (int i = 0; i < cipherText.size(); i++) { char ch[3] = { 0 }; sprintf_s(ch, "%02x", static_cast<byte>(cipherText[i])); cipherTextHex += ch; } return cipherTextHex; } void writeCipher(string output) { ofstream out("cipher.data"); out.write(output.c_str(), output.length()); out.close(); cout << "writeCipher finish " << endl << endl; } string decrypt(string cipherTextHex) { string cipherText; string decryptedText; int i = 0; while (true) { char c; int x; stringstream ss; ss << hex << cipherTextHex.substr(i, 2).c_str(); ss >> x; c = (char)x; cipherText += c; if (i >= cipherTextHex.length() - 2)break; i += 2; } // CryptoPP::AES::Decryption aesDecryption(key, CryptoPP::AES::DEFAULT_KEYLENGTH); CryptoPP::CBC_Mode_ExternalCipher::Decryption cbcDecryption(aesDecryption, iv); CryptoPP::StreamTransformationFilter stfDecryptor(cbcDecryption, new CryptoPP::StringSink(decryptedText)); stfDecryptor.Put(reinterpret_cast<const unsigned char*>(cipherText.c_str()), cipherText.size()); stfDecryptor.MessageEnd(); return decryptedText; } string readCipher() { ifstream in("cipher.data"); string line; string decryptedText; while (getline(in, line)) { if (line.length() > 1) { decryptedText += decrypt(line) + "\n"; } line.clear(); } cout << "readCipher finish " << endl; in.close(); return decryptedText; } int main() { string text = "What's up dude!"; cout << "text : " << text << endl; initKV(); string cipherHex = encrypt(text); cout << "cipher : " << cipherHex << endl; writeCipher(cipherHex); string decrpt_text = readCipher(); cout << "text : " << decrpt_text << endl; return 0; } 运行结果:

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册