Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Encrypting a table in SQL Server
Message
From
20/08/2010 12:47:51
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01477569
Message ID:
01477612
Views:
41
>>>>>I need to implement in my VFP application being converted to SQL Server backend a Password feature. Currently in the VFP application I have a table MyPasswords.dbf that has (simplified) two column USER_NAME (C(20)) PASS_STR (C(200)). The PASS_STR contains a string like this “YNYNNNY” (just bunch of Y and N) encrypted using a very basic algorithm (which I created so it can be cracked in about 20 seconds <g>). But the application does not need much of security so it works.
>>>>>I can basically duplicate the same approach with a SQL Server table but before I do I thought I would ask if SQL Server has a simple (emphasize SIMPLE) way to encrypt a table and un-encrypt it in VFP application?
>>>>>
>>>>>TIA.
>>>>
>>>>
>>>>Why don't you (md5) hash the password a couple of times and store the hex of the hash in the password field ?
>>>
>>>Because I don't know how <g>. If you know of a simple article that you can recommend on the topic, please let me know. I will also search messages on UT if someone already posted an example. Thank you.
>>
>>
>>An example of how to Digest a password. It does a some passes depending on the length and the content of the password
>>
>>
>>function Password_Digest(Password, Digest, LeaveBinaryFormat)
>>
>>	local Success
>>	Success = TRUE
>>	
>>	local i, j, obj
>>	
>>	do case
>>	case !md5Bits_Object(@m.obj)
>>		assert FALSE
>>		Success = FALSE
>>	
>>	case !m.obj.DigestString(m.Password, @m.Digest)
>>		assert FALSE
>>		Success = FALSE
>>	
>>	otherwise
>>		for i = 1 to len(m.Password)
>>			for j = 0 to mod(asc(substr(m.Password, m.i, 1)), 11)
>>				=m.obj.DigestString(m.Digest+m.Password, @m.Digest)
>>			endfor
>>		endfor
>>	
>>	endcase
>>	
>>	do case
>>	case !m.Success
>>	
>>	case m.LeaveBinaryFormat
>>	
>>	otherwise
>>		Digest = ath(m.Digest)  && in hex format
>>	
>>	endcase
>>	
>>	return m.Success
>>
>>endfunc
>>
>
>First thank you for the sample code. But is brings more questions. What is "md5Bits_Object" and how is it created?


See my first link - click to download (you can also use Craig Boyd's fll)

Click on the link of the zip http://www.atoutfox.org/articles.asp?ACTION=FCONSULTER&ID=0000000627
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform