I have a DB with SSN. I would like to encrypt using HashBytes with salt.
I ran
UPDATE tablex
SET essn=HashBytes('SHA1',ssn+salt)
it runs correctly but when I query for WHERE
essn=HashBytes('SHA1','111-11-2222salt') it does not find the record
ssn is a nvchar column salt is also nvchar column
Please help. Thx> ssn is a nvchar column salt is also nvchar column
In that case, specify a Unicode string:
WHERE ssn=HashBytes('SHA1', N'111-11-2222salt')
Hope this helps.
Dan Guzman
SQL Server MVP
"LucFastLife" <LucFastLife@.discussions.microsoft.com> wrote in message
news:E47C332C-5420-4E22-978B-FF01BE55903D@.microsoft.com...
>I have a DB with SSN. I would like to encrypt using HashBytes with salt.
> I ran
> UPDATE tablex
> SET essn=HashBytes('SHA1',ssn+salt)
> it runs correctly but when I query for WHERE
> essn=HashBytes('SHA1','111-11-2222salt') it does not find the record
> ssn is a nvchar column salt is also nvchar column
> Please help. Thx
Showing posts with label salt. Show all posts
Showing posts with label salt. Show all posts
Wednesday, March 21, 2012
Wednesday, March 7, 2012
HAPPY NEW YEAR Everyone
Just got cut loose...
have a safe and happy new year!
anyone seen my salt shaker?
damn what a time to misplace it...Happy new year, Brett. Where is the famous query?|||DECLARE @.NewYearsEve datetime
SELECT @.NewYearsEve = 'Dec 31 2003 17:00:00'
SELECT DATEDIFF(mi, GetDate(), @.NewYearsEve)/60.00 As Hours_till_Margaritaville|||May the new year bring happiness to you all.
Happy New Year !!!|||Happy new year everybody ..
Big thanks to all the guys/girls who made this forum valuable.
I want to mention: Brett Kaiser, MCrowley and blindman ..
Thanks a lot guys!|||Originally posted by AccessUser
Happy new year everybody ..
Big thanks to all the guys/girls who made this forum valuable.
I want to mention: Brett Kaiser, MCrowley and blindman ..
Thanks a lot guys!
I second that !!!|||so, what is everyone's New Year's Resolution?
mine's 800x600
hee hee
:cool:
rudy
http://rudy.ca/|||I resolve not to make any resolutions...
have a safe and happy new year!
anyone seen my salt shaker?
damn what a time to misplace it...Happy new year, Brett. Where is the famous query?|||DECLARE @.NewYearsEve datetime
SELECT @.NewYearsEve = 'Dec 31 2003 17:00:00'
SELECT DATEDIFF(mi, GetDate(), @.NewYearsEve)/60.00 As Hours_till_Margaritaville|||May the new year bring happiness to you all.
Happy New Year !!!|||Happy new year everybody ..
Big thanks to all the guys/girls who made this forum valuable.
I want to mention: Brett Kaiser, MCrowley and blindman ..
Thanks a lot guys!|||Originally posted by AccessUser
Happy new year everybody ..
Big thanks to all the guys/girls who made this forum valuable.
I want to mention: Brett Kaiser, MCrowley and blindman ..
Thanks a lot guys!
I second that !!!|||so, what is everyone's New Year's Resolution?
mine's 800x600
hee hee
:cool:
rudy
http://rudy.ca/|||I resolve not to make any resolutions...
Subscribe to:
Posts (Atom)