>>>
>>>FUNCTION XORDATA(data,Key)
>>> RETURN BITXOR(m.Data,REPLICATE(m.Key,CEILING(LEN(m.Data)/LEN(m.Key))))
>>>ENDFUNC
>>>
>>
>>This won't work. BitXor() works with integers only, not strings.
>>
>>Which is a shame - it should.
>
>
>It does work on Blob fields - you may need a cast
>
>
>return bitxor( cast(m.data as blob), cast(otherdata as blob))
>
Didn't know that - and I need to :).
Tried to see what happens if I cast it as varbinary - and it worked the same when I cast only the first parameter. When I cast both, it worked... sort of - the length of the result was 1.