Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Encryption of long text
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

WindChaser
Posting Yak Master

225 Posts

Posted - 03/18/2013 :  11:22:55  Show Profile  Reply with Quote
Hi folks,

I'm looking for a bit of advice. I've got a field that contains some pretty long text entries that I would like to encrypt. The problem is that SQL Server functions such as EncryptByPassPhrase can only provide encrypted output of no longer than 8000 bytes, which would yield truncated outputs and corrupted data. Are there any world-class methods of encrypting text document data out there that anyone knows of? Thanks!!!

Lamprey
Flowing Fount of Yak Knowledge

4614 Posts

Posted - 03/18/2013 :  13:42:25  Show Profile  Reply with Quote
If you want to go over 8000 characters I think you need to go to a CLR sproc/function.

Here is a sample of how to do it:
http://blog.waldenl.com/2009/12/computing-md5-hash-of-varbinarymax-in.html
http://sqlblog.com/blogs/michael_coles/archive/2009/04/08/let-s-encrypt-a-blob.aspx
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000