[asterisk-dev] MD5 vs md5sum
Tilghman Lesher
tlesher at digium.com
Mon Jun 7 23:29:14 CDT 2010
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
More information about the asterisk-dev
mailing list