Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Bug #21

Closed
wajahatch888 opened this issue Sep 26, 2014 · 1 comment
Closed

PHP Bug #21

wajahatch888 opened this issue Sep 26, 2014 · 1 comment

Comments

@wajahatch888
Copy link

Hello Ivan,

i am using your api and it is really good but there is only one problem and i need solution urgent. your PHP and OBjECTIVE C api is not giving me same result with same salt. i have tried OBJECTIVE C , JAVA , .NET and they are generating same result but PHP is not generating same result. HELP NEEDED.

PHP :-

  require_once(__DIR__.'/../lib/Hashids/Hashids.php');

  $hashids = new Hashids\Hashids('this is my salt');

  $id = $hashids->encode(1,2,3);

  $numbers = $hashids->decode($id);

  var_dump($id, $numbers);
  exit;

giving result after encoding is "laHquq".

OBJECTIVE C:-

   Hashids *hashids = [Hashids hashidWithSalt:@"this is my salt"];
    NSString *hash = [hashids encrypt:@1, @2, @3, nil];

    NSLog(@"%@", hash);

    NSLog(@"%@", [hashids decrypt:hash]);

giving result after encoding is "eGtrS8".

See both results are not same after encoding . i know PHP api has bug. Please help me out. i waiting for your reply

Thanks

@jd327
Copy link
Collaborator

jd327 commented Sep 26, 2014

I replied to your email, PHP version is 1.0, and Objective-C is 0.3. There's a compatibility table here: http://hashids.org/#compatibility. We're in the process of updating all libraries to 1.0

Please add your +1 to jofell/hashids-objc#2

@jd327 jd327 closed this as completed Sep 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants