Re: SHA-1, MD5, etc inquiry [message #61180] |
Wed, 09 July 2008 14:29 |
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  |
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
|
|
|