4 Replies - 1910 Views - Last Post: 11 September 2009 - 01:31 PM Rate Topic: -----

#1 raw-raw  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-September 09

About PHP hashcode

Post icon  Posted 10 September 2009 - 06:57 AM

I use the following Method to get hash of a string in VB6-

GetHash Lib "hashGen.dll" (ByVal tEncode As String) As Long

and the string "satish" produces hashcode "-909473064" by this method in VB6.

I want to do this in PHP, which one algorithm should i use so that i could get the same hashcode of string "satish" in php. plz help me.....
Is This A Good Question/Topic? 0
  • +

Replies To: About PHP hashcode

#2 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: About PHP hashcode

Posted 11 September 2009 - 01:58 AM

Moved to PHP Forums.
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: About PHP hashcode

Posted 11 September 2009 - 05:43 AM

Without knowing the origin or functionality of the GetHash function of the hashGet.dll, it's hard to say what is the equivalent.
Was This Post Helpful? 0
  • +
  • -

#4 raw-raw  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-September 09

Re: About PHP hashcode

Posted 11 September 2009 - 07:04 AM

View PostJackOfAllTrades, on 11 Sep, 2009 - 04:43 AM, said:

Without knowing the origin or functionality of the GetHash function of the hashGet.dll, it's hard to say what is the equivalent.


you can get the origin or functionality of the GetHash function by looking at the VB6 function I've mentioned in my question.
it generates fourbyte Long value of a string.
Was This Post Helpful? 0
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: About PHP hashcode

Posted 11 September 2009 - 01:31 PM

From where does hashGen.dll come? It's not a standard DLL to the best of my knowledge. There's just not enough information to answer this question. There are many different hash functions.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1