简体   繁体   English

检查字符串在 php 中加密

[英]Check String is encrypted in php

I have a form that on it, I've got information from database.我有一个表格,上面有来自数据库的信息。 Now I want to check just a record on it and it is : Is it possible that I check the string value of that field and if it was encrypted or not , for response I return true or false !!现在我只想检查它的记录,它是:我是否有可能检查该字段的字符串值以及它是否已加密对于响应,我返回 true 或 false How can I solve this issue??我该如何解决这个问题??

检查加密的解密的值是否等效于输入文本

To check if it's encrypted you need the key that has encrypted the value.要检查它是否已加密,您需要加密该值的密钥。

SELECT if(AES_DECRYPT(`cloumn`, 'encyrption key...') is null, 'false','true') FROM `table`

If you don't have the key you could maybe try testing a certain language signature (the amount of occurences in the string of certain characters).如果您没有密钥,您可以尝试测试某种语言签名(某些字符的字符串中出现的次数)。 The type of encryption would be rather difficult to detect.加密类型将很难检测。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM