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

Add support for specifying the output length #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

planas
Copy link

@planas planas commented Mar 24, 2014

Hi Nathan, I'm kind of scared pulling this since I'm not too familiar with hash functions. However I've made some quick tests and it seems to work as expected, nonetheless take a look and let me know what you think.

@huobazi
Copy link

huobazi commented Dec 8, 2014

+1

@ACPK
Copy link

ACPK commented Feb 25, 2015

@planas - Thanks for this! @namick - Can this be merged?

@voondo
Copy link

voondo commented Nov 6, 2015

+1

sue445 and others added 2 commits January 19, 2017 15:08
If integerized hashed integer is passed, can not reversible

e.g)

```ruby
ScatterSwap.hash(2970439418180909067, 0, 20)
=> "02792428384994356370"

ScatterSwap.reverse_hash("02792428384994356370", 0)
=> "02970439418180909067"

ScatterSwap.reverse_hash(2792428384994356370, 0)
=> "6564430356352013192"
```
Add length arg to ScatterSwap.reverse_hash too
@khiav223577
Copy link

+1

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

Successfully merging this pull request may close these issues.

6 participants