There is any md5 or sha-1 hash builtin fuction in MongoDB? I searched
MongoDB website/documentation but got no results.
Thanks,
--
Gabriel Vieira
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>
What do you think?
--
Gabriel Vieira
On Wed, Apr 14, 2010 at 2:47 AM, Gabriel Vieira
--dan()
On Apr 14, 4:55 pm, Mathias Stearn <math...@10gen.com> wrote:
> That sounds like something that would be better done in your
> application, rather than the database server. We do use (double)
> hashing of passwords so they are not transmitted in the clear. Seehttp://www.mongodb.org/display/DOCS/Implementing+Authentication+in+a+...
>
> On Wed, Apr 14, 2010 at 2:47 AM, Gabriel Vieira
>
>
>
> <gabriel.vie...@gmail.com> wrote:
> > I could use to generate a MD5 string from another (text, password,
> > etc) direct in the DB, link relationals DB.
>
> > What do you think?
>
> > On Wed, Apr 14, 2010 at 3:40 AM, Mathias Stearn <math...@10gen.com> wrote:
> >> We have the filemd5 command for gridfs, but no other hashing. Do you
> >> have a use case in mind?
>
> >> On Wed, Apr 14, 2010 at 2:24 AM, Gabriel Vieira
> >> <gabriel.vie...@gmail.com> wrote:
> >>> Hi there again.
>
> >>> There is any md5 or sha-1 hash builtin fuction in MongoDB? I searched
> >>> MongoDB website/documentation but got no results.
>
> >>> Thanks,
>
> >>> --
> >>> Gabriel Vieira
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> >>> To post to this group, send email to mongod...@googlegroups.com.
> >>> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> >>> For more options, visit this group athttp://groups.google.com/group/mongodb-user?hl=en.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> >> To post to this group, send email to mongod...@googlegroups.com.
> >> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/mongodb-user?hl=en.
I have a decent use case. I need to md5 compound keys in a map
function to avoid creating _id's that are too long.
The compound key is produced by the map function using multiple values
(url + etc). Some data values exceed the length allowable by the
btree indexer. I don't actually need a readable value in the _id, so
I'd be happy to hash these values. All the data is appropriately
stored in the value returned by my map function. But there's no md5
available.
I can implement the desired behavior by iterating over the collection,
doing the calculation externally, updating the rows, then running a
mapreduce. But that doesn't allow mongo to parallelize the mapping
across multiple servers. And seems clunky to run a map step prior to
running mapreduce.
Best,
Patrick
> hex_md5( "foo" )
acbd18db4cc2f85cedef654fccc4a4d8