hashids-objc icon indicating copy to clipboard operation
hashids-objc copied to clipboard

Encrypt gives a different result using this code then Ruby code

Open ankurp opened this issue 11 years ago • 3 comments

When I create a hasher with a salt and use the same salt in Ruby using the ruby hash ids code I get complete different results. Is this a bug? I want to be able to get the same hash ids when calling encrypt on Ruby and on Objective C code.

ankurp avatar Feb 01 '14 03:02 ankurp

I have the same problem with this class, however with me PHP and Javascript give the same output and this one gives something completely different. Unusable if you want interoperability.

chrisjhill avatar Aug 06 '14 11:08 chrisjhill

Hi @ankurp, would you mind giving me a sample code for this?

Thanks.

jofell avatar Aug 31 '14 20:08 jofell

Hi @chrisjhill, v1.0.0 of the PHP and Javascript versions are coming soon, and we contributors of the Hashids spec should be able to move from the old algorithm (0.3.* still being used by Python and Ruby) to the new one (1.0.0 which is now being used by Javascript, Coffeescript, and PHP). Will let you know as soon as I get to study the new algorithm (it has been a year since I actually touched this repo).

But rest assured that this September that fixes will be coming in.

Sorry for the very late replies.

jofell avatar Aug 31 '14 20:08 jofell