在C/C ++中加密文本文件的最佳方法是什么? [英] What is the best way to encrypt a text file in C/C++?

查看:82
本文介绍了在C/C ++中加密文本文件的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于C/C ++的cgi Web应用程序将在用户登录后在服务器上创建一个临时文本文件.当用户注销时,该文本文件将被删除.我想加密此文本文件以及文件的内容.该文件将包含用户名和密码之类的信息.

A C/C++ based cgi web application will be creating a temporary text file on the server as long as the user is logged in. The text file will be deleted when the user logs off. I want to encrypt this text file and also the content of the file. The file will contain information like username and password.

做到这一点的最佳方法是什么?

What is the best way to do this?

我看到建议使用库.我的问题是我只能使用Standard C ++库.

I see libraries being suggested. My problem is I cannot use anything but Standard C++ library.

推荐答案

使用众所周知的库(例如openssl),并遵循众所周知的

Use a well known library such as openssl and follow well known examples and stay away from platform specific solutions.

这篇关于在C/C ++中加密文本文件的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆