I have many different string values in a collection.
Some values were encrypted by X509Certificate2. All other values are numbers, non encrypted strings, dates, etc.
My goal to filter possible candidates for decryption. So I want to use a function that can implement first fast filtration of values that were encrypted.
I use this simple check:
private bool IsEncryptedValue(string value)
{
var result = !string.IsNullOrEmpty(value) && IsBase64String(value);
return result;
}
Please advise more correct (more strong) rules for checking encrypted value.
Thanks for any suggestions.