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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sha 256

Author  Topic 

pnpsql
Posting Yak Master

246 Posts

Posted - 2012-05-09 : 08:51:39
how to implement sha 256 in sql server

challenge everything

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2012-05-09 : 09:21:28
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
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-05-09 : 09:21:29
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

15732 Posts

Posted - 2012-05-09 : 09:31:35
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

246 Posts

Posted - 2012-05-10 : 01:12:08
any link for sha256 in clr

challenge everything
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-05-10 : 08:14:43
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 - 2013-06-06 : 01:50:39
SHA256, SHA512 in SQL SERVER 2008 OR SQL SERVER 2005!

fnEnCryptSHA!

unspammed
Go to Top of Page
   

- Advertisement -