简体   繁体   中英

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 !! 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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