Results 1 to 6 of 6

Thread: Hash function

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    72

    Hash function

    I was testing the Hash function today.
    And I read here http://il2.php.net/manual/en/function.hash.php
    If I set the parameter $raw_output=true the function will return a binary rows instead of hexits values.

    But when I try it it returns a strange characters instead of binary values?

    So can you explain for me what they mean by binary rows, and why I don't see binary values?

    Thanks

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Hash function

    i tried it and i see what you mean. i am not really sure what is happening.

    this is what i got:

    \o��@�Uks�c���
    My usual boring signature: Something

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Hash function

    Raw binary data, not characters. You're trying to view them as characters, hence the confusion.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    72

    Re: Hash function

    so How can I see the actual binary values?

  5. #5
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: Hash function

    You mean how do you see the characters that the binary values represent?
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Hash function

    Quote Originally Posted by ayman_rapper
    so How can I see the actual binary values?
    If you wish to see the binary output in a visual form then you don't set the raw_output argument to true. The character form of the hash is usually expressed as hexadecimal digits 0-F rather than binary digits to make it easier to read.

    If you want to save space and simply compare hashes, (not read or transfer it as part of a text protocol HTTP/SMTP) then you should set the raw_output argument to true.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width