| Author |
Message |
rodmusser
Joined: 26 Jan 2011 Posts: 1
|
Posted: Wed Jan 26, 2011 8:02 pm Post subject: Binary Data |
|
|
| We use encrypted columns to store sensitive data (e.g. SSN, birthdates, etc). These columns are defined as varbinary types. How can I generate binary data so that they are functionally correct? For example, all SSN need to be 9 digits. |
|
| Back to top |
|
 |
james.billings
Joined: 16 Jun 2010 Posts: 840 Location: My desk.
|
Posted: Fri Jan 28, 2011 10:36 am Post subject: |
|
|
The Binary generator will generate random values between 0 and the max as defined for the column by default. So a varbinary(50) column would end up with data randomly between those minimum and maximum lengths.
You can set these figures manually, so for your SSN column, you could set both Min Length and Max Length to 9.
If you need the binary values to be generated in a specific way to emulate your encryption routines however, you'll probably need to write a custom generator. You'll find some examples in:
C:\Program Files (x86)\Red Gate\SQL Data Generator 1\UserExample\Generator
(omit the (x86) if you're on a 32-bit OS)
And also some information on our website here |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group