Hashing

  • Mattrick (1/24/2012)


    ... that shows why salting your hashes is so important ...

    A little bit of pepper doesn't hurt either. :hehe:

  • Thanks yet again Steve.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • paul.knibbs (1/24/2012)


    A non-deterministic hash function wouldn't be terribly useful, would it? 😉

    That's what I was thinking... I had to harken back to Advanced Concepts in C... at least it was considered advanced concepts in C 14 years ago.... these days this is probably beginners stuff (Hashes and the like)....

    Aaah age.... where'd I put my walker?



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Glad you liked the question. I was working on something else and learned a few things here.

  • paul.knibbs (1/24/2012)


    A non-deterministic hash function wouldn't be terribly useful, would it? 😉

    Why not? I can think of at least one use for one.

    In the old days the apprentice engineer was sent to fetch a bucketful of holes, more recently people were asked to design a device driver for the GSD, and today we could assign the task of producing an effective access control system using an indeterminate hash - the victimtrainee would have exactly the same chance of carrying out this task as anyone did with the traditional spoof tasks.

    Tom

  • Nice question, thanks for the points!

  • An easy one - thanks, Steve!

  • Good question.

    CREATE FUNCTION dbo.Hash_SHA (@data nvarchar(200))

    RETURNS TABLE WITH SCHEMABINDING AS RETURN

    SELECT HASHBYTES('SHA', @data) AS hash_value

    GO

    -- Returns 1 (true)

    SELECT

    OBJECTPROPERTYEX(OBJECT_ID(N'dbo.Hash_SHA', N'IF'), 'IsDeterministic');

  • I've never used the HashBytes() function so I learnt something new.

    I got it right at first because of logic thinking but the options had me wondering and I had to research a little before answering.

    Thank you for this QoTD.

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • Thank you for the question

    Iulian

  • OK, every other QotD has had explanations that were easy (for me) to understand. Since the question asked about the "relationship" between the 2, I assumed none since they were different variables.

    Answer C, deterministic and always the same, looked right and I was inclined to pick that since I knew that was true, but what does that have to do with the relationship between the two? Or am I just totally misreading the question?

    Peter Trast
    Microsoft Certified ...(insert many literal strings here)
    Microsoft Design Architect with Alexander Open Systems

Viewing 11 posts - 16 through 25 (of 25 total)

You must be logged in to reply to this topic. Login to reply