If you want small changes in the input to affect all bits in the output, 
then yes, that's what good ciphers are doing. If you just want users to 
clearly distinguish one value from another, that will do fine. I just hope 
you aren't going to use 64bit cipher to ensure unpredictability of ids...

I don't know what base56 is... But you can just use base64. Youtube uses 
URL-base64 encoding replacing last two chars with "-" and "_".

But anyway... mongodb id is 12 bytes. It would be 16 bytes base64-encoded. 
That's too long, and I'd very much like to see a solution to create shorter 
or more user-friendly ids.

Did you think about assigning auto-incrementing number to a message? Or a 
string like "user_number"? Or whatever... mongodb _ids are very much 
necessary, but they don't always need to be exposed to user.


On Friday, May 31, 2013 8:40:34 PM UTC+4, ryandesign wrote:
>
>
> On May 31, 2013, at 04:56, Alex Kocharin wrote: 
>
> >> I'd like my user-facing ids to look "more random" than that. 
> > 
> > In other words, you want this: 
> > 4273efa0006b70 
> > 4273efa000b400 
> > 4273efa000f7e0 
> > 4273efa0013810 
> > 
> > To look like this?: 
> > 8fe615a3dfd19b0c 
> > 0673b4d04ffa4b17 
> > 67126afba95997b4 
> > 292717c7064e6019 
> > 
> > 
> > Well, there's a standard way of doing that. :) 
>
> Ok, thanks for letting me know about crypto. So you would suggest objectid 
> -> crypto -> base56? If so, what's a good module for doing base56? 
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to