plain PHP implementation of hash function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • voipfc@googlemail.com

    plain PHP implementation of hash function


    I have a problem compiling the hash function from PECL into my PHP.

    I get the error configure: error: C preprocessor "/lib/cpp" fails
    sanity check

    I would like to use a plain PHP implementation of these functions.

    Is there a library of them around?

  • petersprc@gmail.com

    #2
    Re: plain PHP implementation of hash function

    PHP has a number of hash functions built-in. For example:

    md5, md5_file, sha1, sha1_file, crc32

    PECL has additional algorithms listed here:



    Was there a specific algorithm you needed?

    voipfc@googlema il.com wrote:
    I have a problem compiling the hash function from PECL into my PHP.
    >
    I get the error configure: error: C preprocessor "/lib/cpp" fails
    sanity check
    >
    I would like to use a plain PHP implementation of these functions.
    >
    Is there a library of them around?

    Comment

    • voipfc@googlemail.com

      #3
      Re: plain PHP implementation of hash function


      petersprc@gmail .com wrote:
      PHP has a number of hash functions built-in. For example:
      >
      md5, md5_file, sha1, sha1_file, crc32
      >
      PECL has additional algorithms listed here:
      >

      >
      Was there a specific algorithm you needed?
      >
      I need an sha1 version, the built-in one causes apache to GPF in
      windows
      voipfc@googlema il.com wrote:
      I have a problem compiling the hash function from PECL into my PHP.

      I get the error configure: error: C preprocessor "/lib/cpp" fails
      sanity check

      I would like to use a plain PHP implementation of these functions.

      Is there a library of them around?

      Comment

      • Andy Hassall

        #4
        Re: plain PHP implementation of hash function

        On 7 Oct 2006 15:48:20 -0700, voipfc@googlema il.com wrote:
        >
        >petersprc@gmai l.com wrote:
        >PHP has a number of hash functions built-in. For example:
        >>
        > md5, md5_file, sha1, sha1_file, crc32
        >>
        >PECL has additional algorithms listed here:
        >>
        > http://us3.php.net/manual/en/function.hash-algos.php
        >>
        >Was there a specific algorithm you needed?
        >
        >I need an sha1 version, the built-in one causes apache to GPF in
        >windows
        The user notes in the manual have a pure-PHP implementation of SHA1, if you
        want to use that. http://uk2.php.net/sha1 (It'll be somewhat slower...)

        What version of PHP are you using? sha1() doesn't crash here (PHP 5.1.6 on
        Windows).

        --
        Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
        http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

        Comment

        Working...