You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gergely Imre <gi...@barom.nextra.ro> on 2000/09/08 17:24:54 UTC
Run
Hi all!
How can I run a C program from an XML/XSL file? For example I have a login
page, with "Login name:" and "Login passwd:", and one button. When I press
the button, I want to run an external program to check the password. How
can I do that?
Or: is there some util to convert a string to an md5 encrypted string?
Thanx
--
GImre
(ICQ# 86297366)
Re: Run
Posted by Ugo Cei <u....@cbim.it>.
Gergely Imre wrote:
> Or: is there some util to convert a string to an md5 encrypted string?
String password = "whatever";
// Encode password as MD5
java.security.MessageDigest md =
java.security.MessageDigest.getInstance("MD5");
byte[] digest = md.digest(password.getBytes());
--
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it
Re: Run
Posted by Ross Burton <ro...@mail.com>.
> > I believe there is a function in Tomcat to do the md5 hash - grab the
> > Tomcat source and copy the code. Of course, if you run Tomcat you can
> > just call the function.
> And where can I find that source?
jakarta.apache.org
Either grab a milestone build, or checkout a CVS tree if you feel brave.
> OK, I hope I can do this, but I'm still wondering how can I run some
> external programs?
What was the context? Sorry - my Cocoon folders are AWOL at present so
I only have messages for the last few days. System.exec() will let you
run a program, there are good examples of it in the Cocoon Javac invoker
(part of XSP) which shows how to grab the output from an external
program.
Ross Burton
Re: Run
Posted by Gergely Imre <gi...@barom.nextra.ro>.
And where can I find that source?
OK, I hope I can do this, but I'm still wondering how can I run some
external programs?
On 8 Sep 2000, Ross Burton wrote:
> > Or: is there some util to convert a string to an md5 encrypted string?
>
> I believe there is a function in Tomcat to do the md5 hash - grab the
> Tomcat source and copy the code. Of course, if you run Tomcat you can
> just call the function.
>
> Ross Burton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
--
GImre
(ICQ# 86297366)
Re: Run
Posted by Ross Burton <ro...@mail.com>.
> Or: is there some util to convert a string to an md5 encrypted string?
I believe there is a function in Tomcat to do the md5 hash - grab the
Tomcat source and copy the code. Of course, if you run Tomcat you can
just call the function.
Ross Burton