comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: SHA-1, MD5, etc inquiry
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: SHA-1, MD5, etc inquiry [message #61180] Wed, 09 July 2008 14:29
cgh1 is currently offline  cgh1
Messages: 3
Registered: July 2008
Junior Member
Thanks for the reply! This is actually something I'm working on now,
only for sha-1. I was hoping to use call_external but after fighting
with that all day (xp+cygwin+student edition of idl....), I think
spawn is probably the easiest answer. Now to see what kind of
performance hit I take! =-)

I definitely understand about the prioritizing too - I'd like to do
it, but there are too many other things that also need to get done
first.

--Topher

On Jul 9, 11:43 am, Brian Larsen <balar...@gmail.com> wrote:
> I have wanted to do this before too, but the want has never moved high
> enough on the priority to write md5 as an idl routine.
>
> One thing that I played with a bit which is not portable or elegant
> but does seem to work (on my mac and should on *nix, no ides about
> windoze)
>
> IDL> data = 'Hello World'
> IDL> spawn, 'echo ' + data + ' | md5sum', md5
> IDL> print, md5
> e59ff97941044f85df5297e1c302d260 -
Re: SHA-1, MD5, etc inquiry [message #61185 is a reply to message #61180] Wed, 09 July 2008 08:43 Go to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
I have wanted to do this before too, but the want has never moved high
enough on the priority to write md5 as an idl routine.

One thing that I played with a bit which is not portable or elegant
but does seem to work (on my mac and should on *nix, no ides about
windoze)

IDL> data = 'Hello World'
IDL> spawn, 'echo ' + data + ' | md5sum', md5
IDL> print, md5
e59ff97941044f85df5297e1c302d260 -

IDL> data=findgen(10)
IDL> spawn, 'echo ' + string(data) + ' | md5sum', md5
IDL> print, md5
4b9d67607a952096a57046fe548ed2b3 -

IDL> spawn, 'echo ' + string(data+1) + ' | md5sum', md5
IDL> print, md5
babb8b471280af36b692685c4b8952b3 -



Brian

------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Mapping image into a polar-square coordinate
Next Topic: Re: Radar Gridding Advice Sought

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:51:30 PDT 2025

Total time taken to generate the page: 0.00436 seconds