[asterisk-dev] MD5 vs md5sum

yiping wang ypwangreg at gmail.com
Tue Jun 8 08:18:26 CDT 2010


On Tue, Jun 8, 2010 at 12:29 AM, Tilghman Lesher <tlesher at digium.com> wrote:

> On Monday 07 June 2010 22:10:52 yiping wang wrote:
> > Hi All,
> >
> > I am now confused by MD5 function
> >
> > I have some dial plan like following:
> > exten => login,n,Set(tts1="please enter your 10 digit password")
> > exten => login,n,Set(tts1hash=${MD5(${tts1})})
> >
> > The output is like:
> >     -- Executing [login at hotdesk:6] Set("SIP/desk_1-00000003",
> "tts1="please
> > enter your 10 digit password"") in new stack
> >     -- Executing [login at hotdesk:7] Set("SIP/desk_1-00000003",
> > "tts1hash=0a2307cdfe0eb4db28d672260c84ef49") in new stack
> >
> > But the md5sum output is like:
> > [trixbox1.localdomain asterisk]# echo -n "please enter your 10 digit
> > password"|md5sum
> > a607638e751697da33d510aecc560468  -
> >
> > My current asterisk version is Asterisk 1.6.0.26-FONCORE-r78
> >
> > I am totally lost.
> >
> > Thanks for the help.
>
> Lose the quotation marks.
> % echo -n "\"please enter your 10 digit password\"" | md5sum
> 0a2307cdfe0eb4db28d672260c84ef49  -
>
> --
> Tilghman Lesher
> Digium, Inc. | Senior Software Developer
> twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
> Check us out at: www.digium.com & www.asterisk.org
>
> Thanks Tilghman! That works..
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20100608/d890dc7c/attachment.htm 


More information about the asterisk-dev mailing list