Check for the given QString data is encrypted or not
How to check whether the given data(QString) is encrypted or not in C++.
Is there any method of checking it?
Please help me to solve this.
The question is what you are defining as encrypted?
You may be able to check the string for unicode and see the length of string in comparison to its original length.
You can check with decrypt algorithms if they match the general pattern and the decryption succeeds.
As @koahnig says. Depending on the encryption algorithm you can never be sure anyway whether some string/bytes are encrypted --- there's no reason why a string like
the quick brown foxcan't be encrypted as another legitimate string like
jumps over the lazy dog, so it might be encrypted or it might not and you can't be sure....
@koahnig Thank you for your reply and i will try this.