Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Generate Hash Key in SQL Server 2005 using SHA 512 algorithm

Posted on 2011-03-14
6
Medium Priority
?
2,623 Views
Last Modified: 2012-05-11
How to generate hash keys for a table data in SQL Server 2005 using SHA 512 algorithm?
0
Comment
Question by:Muralidharand
  • 4
6 Comments
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 35127261
try:-

Declare @crypt NVARCHAR(100);
set @crypt='test';

EXEC sp_OASetProperty @crypt, 'HashAlgorithm', 'sha256'
 EXEC sp_OAMethod @crypt, 'HashStringENC', @hash OUT, @s

 PRINT 'SHA256:'

 PRINT @hash

Open in new window

0
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 35127281
before running the above sql you will have to "Enable Ole automation" for SQL Server.
Follow these steps:-

start -> programs ->MS sql 2005 -> configuration tools -> surfce area configuration -> Surface area conf for features ->

Ole automation -> select the Enable check box and save
0
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 35127287
OLE Automation can also be enabled through:-

exec sp_configure 'Ole Automation Procedures', 1
go
reconfigure
go

Open in new window

0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 9

Accepted Solution

by:
mayank_joshi earned 1500 total points
ID: 35127292
the following link may be helpful for other encryption techniques:-

http://www.example-code.com/sql/crypt_hash_algorithms.asp
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 35128505
Depending on the length of the string, you can possibly use HASHBYTES.  Hashbytes supports SHA and SHA1.

http://msdn.microsoft.com/en-us/library/ms174415%28v=sql.90%29.aspx
0
 
LVL 1

Author Closing Comment

by:Muralidharand
ID: 35196895
Your post was helpful.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question