SQL Server Forums
Profile | Register | 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
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

WindChaser
Posting Yak Master

224 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  
 New 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.05 seconds. Powered By: Snitz Forums 2000