Hi,
I am quite new to T-SQL and I'm facing a problem: how can I insert a
MD5 hash from T-SQL in one field? Using MySQL all I had to do was to
call the md5 function, but in SQL Server I failed to find it. Does MD5
function exist in T-SQL ? How can I solve this problem?
Thanks in advance!
AndreiCandreic wrote:
> Hi,
> I am quite new to T-SQL and I'm facing a problem: how can I insert a
> MD5 hash from T-SQL in one field? Using MySQL all I had to do was to
> call the md5 function, but in SQL Server I failed to find it. Does MD5
> function exist in T-SQL ? How can I solve this problem?
> Thanks in advance!
> AndreiC
In SQL Server 2005:
INSERT INTO tbl (col)
SELECT HashBytes('MD5', 'foobar') ;
In SQL Server 2000 you'll have to create your own. .NET has classes for
encryption and hashing.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||You can exttended stored procedure for MD5 in SQL Server 2000.
You can find a example below url.
http://www.codeproject.com/database/xp_md5.asp
"andreic"?? ??? ??:
> Hi,
> I am quite new to T-SQL and I'm facing a problem: how can I insert a
> MD5 hash from T-SQL in one field? Using MySQL all I had to do was to
> call the md5 function, but in SQL Server I failed to find it. Does MD5
> function exist in T-SQL ? How can I solve this problem?
> Thanks in advance!
> AndreiC
>|||If this is a secured application, you might consider using SHA-style hashes,
since MD5 is not considered secure anymore. An SHA-256/384/512 hash
function is available at
http://www.sqlservercentral.com/col...oolkitpart4.asp
"andreic" <andrei.croitoriu@.gmail.com> wrote in message
news:1150048549.960214.268210@.i40g2000cwc.googlegroups.com...
> Hi,
> I am quite new to T-SQL and I'm facing a problem: how can I insert a
> MD5 hash from T-SQL in one field? Using MySQL all I had to do was to
> call the md5 function, but in SQL Server I failed to find it. Does MD5
> function exist in T-SQL ? How can I solve this problem?
> Thanks in advance!
> AndreiC
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment