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
 General SQL Server Forums
 New to SQL Server Programming
 sha 256
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pnpsql
Posting Yak Master

India
246 Posts

Posted - 05/09/2012 :  08:51:39  Show Profile  Reply with Quote
how to implement sha 256 in sql server

challenge everything

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 05/09/2012 :  09:21:28  Show Profile  Reply with Quote
select hashbytes('sha2_256', <valueToHash>)

I think as of sql 2008 r2 only SHA1 is available.
Check out:
http://msdn.microsoft.com/en-us/library/ms174415%28v=sql.105%29.aspx


Be One with the Optimizer
TG
Go to Top of Page

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 05/09/2012 :  09:21:29  Show Profile  Reply with Quote
There is the HASH_BYTES function in T-SQL http://msdn.microsoft.com/en-us/library/ms174415.aspx Would that work for you?
Go to Top of Page

robvolk
Most Valuable Yak

USA
15665 Posts

Posted - 05/09/2012 :  09:31:35  Show Profile  Visit robvolk's Homepage  Reply with Quote
SHA256 is supported in HASHBYTES() in SQL 2012, for earlier versions you'd need to use a CLR function.
Go to Top of Page

pnpsql
Posting Yak Master

India
246 Posts

Posted - 05/10/2012 :  01:12:08  Show Profile  Reply with Quote
any link for sha256 in clr

challenge everything
Go to Top of Page

robvolk
Most Valuable Yak

USA
15665 Posts

Posted - 05/10/2012 :  08:14:43  Show Profile  Visit robvolk's Homepage  Reply with Quote
Ummmmm, Google? "sql clr sha256" ?

http://sqlblog.com/blogs/michael_coles/archive/2009/04/12/let-s-hash-a-blob.aspx
Go to Top of Page

innoya
Starting Member

2 Posts

Posted - 06/06/2013 :  01:50:39  Show Profile  Reply with Quote
SHA256, SHA512 in SQL SERVER 2008 OR SQL SERVER 2005!

fnEnCryptSHA!

unspammed

Edited by - innoya on 02/18/2014 19:44:30
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.08 seconds. Powered By: Snitz Forums 2000