|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Scramble Integer column?I have an int column for client ID (with unique contraint). Is there a good
way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs still stay together. nkw wrote:
> I have an int column for client ID (with unique contraint). Is there a good Why are you posting this again?> way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs > still stay together. Sounds like it is for malicious intent, but I'm sure a simple update
set combo would do it. nkw wrote: Show quote > I have an int column for client ID (with unique contraint). Is there a good > way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs > still stay together. It's not for malicious intent. We have some summary reports for our clients
but we cannot let they figure out who is who in the report. Maybe need some crytography knownledge? Show quote "Stopher" wrote: > Sounds like it is for malicious intent, but I'm sure a simple update > set combo would do it. > nkw wrote: > > I have an int column for client ID (with unique contraint). Is there a good > > way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs > > still stay together. > > nkw wrote:
> It's not for malicious intent. We have some summary reports for our clients What are you exactly trying to do? Perhaps we could suggest alternative> but we cannot let they figure out who is who in the report. > > Maybe need some crytography knownledge? solution if we knew the whole problem. Assuming the other information in the report doesn't give
any clues to who's who, my suggestion is for you to generate new random integers with binary_checksum(newid()) each time you want to do this: If your report is the output of a query with one row per id you want to hide, then you can do something like this: select binary_checksum(newid()) as codedID, <all columns of your report with the exception of the id you want to hide> from <continue as in the query for your report> order by newid() If you need to be able to recover the actual ids after generating this report, include the id you want to hide in the query, but delete that column from the results when you provide the report to the clients (keeping the codedID and actual ID columns yourself to enable the decoding. Steve Kass Drew University www.stevekass.com Show quote "nkw" <n**@discussions.microsoft.com> wrote in message news:8A2F91B5-5209-4E31-8A07-04150D68A654@microsoft.com... > It's not for malicious intent. We have some summary reports for our clients > but we cannot let they figure out who is who in the report. > > Maybe need some crytography knownledge? > > "Stopher" wrote: > >> Sounds like it is for malicious intent, but I'm sure a simple update >> set combo would do it. >> nkw wrote: >> > I have an int column for client ID (with unique contraint). Is there a good >> > way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs >> > still stay together. >> >> thanks, that's good suggestion. i also found and used the undocumented
function pwdencrypt. Show quote "Steve Kass" wrote: > Assuming the other information in the report doesn't give > any clues to who's who, my suggestion is for you to generate > new random integers with binary_checksum(newid()) > each time you want to do this: > > If your report is the output of a query with one row per > id you want to hide, then you can do something like this: > > select > binary_checksum(newid()) as codedID, > <all columns of your report with the exception of the id you want to hide> > from <continue as in the query for your report> > order by newid() > > If you need to be able to recover the actual ids after generating this > report, include the id you want to hide in the query, but delete that > column from the results when you provide the report to the clients > (keeping the codedID and actual ID columns yourself to enable the > decoding. > > Steve Kass > Drew University > www.stevekass.com > > "nkw" <n**@discussions.microsoft.com> wrote in message news:8A2F91B5-5209-4E31-8A07-04150D68A654@microsoft.com... > > It's not for malicious intent. We have some summary reports for our clients > > but we cannot let they figure out who is who in the report. > > > > Maybe need some crytography knownledge? > > > > "Stopher" wrote: > > > >> Sounds like it is for malicious intent, but I'm sure a simple update > >> set combo would do it. > >> nkw wrote: > >> > I have an int column for client ID (with unique contraint). Is there a good > >> > way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs > >> > still stay together. > >> > >> > > > |
|||||||||||||||||||||||