Encryption Class(加密类)
The Encryption Class provides two-way data encryption. It uses a scheme that pre-compiles the message using a randomly hashed bitwise XOR encoding scheme, which is then encrypted using the Mcrypt library. If Mcrypt is not available on your server the encoded message will still provide a reasonable degree of security for encrypted sessions or other such "light" purposes. If Mcrypt is available, you'll effectively end up with a double-encrypted message string, which should provide a very high degree of security. 这个加密类提供了两种数据加密的方法。首先它使用一些随机的无顺序的逐位异或xor直接交换数值的编码方案预先编译一些信息,然后再将它们放在隐蔽的类似Mcrypt的地方。如果这个Mcrypt 不是可利用的,会给您的服务器编码消息轻巧的加密,将会提供合理安全程度。如果这个Mcrypt 是可以使用的,最终你可以获得一个被双重加密的字符串,这样加密的话,会使你的信息非常安全
A key is a piece of information that controls the cryptographic process and permits an encrypted string to be decoded. In fact, the key you chose will provide the only means to decode data that was encrypted with that key, so not only must you chose the key carefully, you must never change it if you intend use it for persistent data. 钥匙实际上是一些会控制密码加密过程并且允许被加密的字串被解码的信息片段。实际上,你选择的钥匙会提供一个唯一的方法来解密一些被加密的数据,所以你需要非常谨慎的设置你的钥匙,如果你想给一些固定的数据加密的话,你最好不要更改这个钥匙。 It goes without saying that you should guard your key carefully. Should someone gain access to your key, the data will be easily decoded. If your server is not totally under your control it's impossible to ensure key security so you may want to think carefully before using it for anything that requires high security, like storing credit card numbers. 很自然,你需要非常小心的保守你的钥匙。如果某人对您的钥匙能够存取,那么数据将会很容易地被解码。如果您的服务器不完全在的您的控制之下而想保证数据安全是不可能的,因此您可以在使用它之前仔细地想一下要求高安全存放信用卡数字对象。 |