在Delphi中加密/解密文本文件? [英] Encrypt/ Decrypt text file in Delphi?

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

问题描述

我想知道文本文件加密和加密的最佳加密技术。



我的场景:



我有软件有两种类型的用户管理员和操作员。我们的要求是加密文本文件时,管理员使用GUI输入数据并保存。该加密文件将被输入给Operator,他们只需要选择它并使用该文件。这个文件应该自动解密数据,以便在操作员选择这些文件时进一步计算。



请帮助我使用哪种加密/解密技术?

解决方案

加密时的一个黄金规则是了解加密技术是一个整体,这是非常困难的。



有多种不同的方法/算法可供选择,没有一种算法/方法可以说是最好的。这一切都取决于您的需求和影响应用程序分发的可能性等。



可能有问题的情况的一个例子是,在您的场景中,解密密钥需要分发与应用程序,并可能使其不安全。这通常被称为密钥分发问题。



开始阅读密码的好地方是 http://en.wikipedia.org/wiki/Cryptography



至于现成的东西对于Delphi,有几个很好的包可用:





Torry的页面也有长组件列表:





我强烈建议您使用一些现有的实现,而不是开始自己做,因为创建安全的加密密码算法非常困难。


Hi i would like to know best encryption technique for text file encryption and ecryption.

My Scenario:

I have software having two type of users Administartor and Operators. Our requirement is to encrypt text file when Administrator enter data using GUI and save it. That encrypted file would be input for Operator and they just need to select it and use that file. Here file should be automatically decrypt data for further calculation when Operator select those files.

Please help me which encryption/ decryption technique should i use?

解决方案

A golden rule when doing crypto is to understand that cryptography as a whole it is very difficult.

There are a multitude of different approaches/algorithms to choose from, and no single algorithm/method can be said to be the best one. It all depends on your needs and possibilities to affect application distribution etc.

An example of a potentially problematic situation is that in your scenario the decryption "key" needs to be distributed with the application(s) and might make it insecure. This is generally referred to as the "Key Distribution" problem.

A good place to start reading about crypto is http://en.wikipedia.org/wiki/Cryptography.

As for ready made stuff for Delphi there are a few good packages available:

Torry's pages also has a long list of components:

I strongly recommend you use some of the existing implementations and not start to do your own, since creating a secure working crypto algo is very very difficult.

这篇关于在Delphi中加密/解密文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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