ENCRYPTED FIELD
Kenneth Brody
kenbrody at spamcop.net
Wed Oct 28 09:06:50 PDT 2009
Fairlight wrote:
> On Wed, Oct 28, 2009 at 11:24:35AM -0400, Richard Kreiss may or may not have
> proven themselves an utter git by pronouncing:
>>
>> I have an encrypted field of 20 characters which decrypted would be numbers.
>>
>> Anyone have an easy way to test the value to see if it is encrypted since
>> there is no guarantee that any specific graphics character would be
>> present.
[...]
> I don't know of an encryption algorithm that would leave all numbers based
> on all numeric input. I suppose it's possible, but highly unlikely.
>
> Instead of checking each character to be in one of three ranges, loop to
> dlen() of the field, mid()ing off one char further each time. Check to see
> if the char -is- numeric. The first time you hit a non-numeric, you've
> found it's encrypted, exit loop early. Otherwise, it's 99.999% likely not
> encrypted.
What about XLATE() all numbers to spaces, and see if the field is non-blank?
But as you and I both pointed out, it's not 100% guaranteed that all-numbers
means "not encrypted".
--
Kenneth Brody
More information about the Filepro-list
mailing list