views:

165

answers:

1

Is it possible to generate a SHA-256 hash of a string from a stored procedure in Sql Server 2008?

For deployment reasons, I'd prefer it in TSQL.

+2  A: 

Sure. You can do it in TSQL, but it will be much easier to implement it as a CLR Stored procedure.

Here's an actual example, that simply uses the .NET Framework types: Let's Hash a BLOB

Mitch Wheat
Hi Mitch thanks for that. For deployment reasons, I'd prefer it in TSQL. I'll clarify.
WOPR
It's going to be considerably harder to write and less perform less well in TSQL ...
Mitch Wheat

related questions