-1

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??

brelian
  • 403
  • 2
  • 15
  • 31

2 Answers2

0

Check the encrypted of decrypted of the value is equivalent to the input text

Akshaya Moorthy
  • 309
  • 3
  • 11
0

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.

Chris Hemmens
  • 367
  • 2
  • 11