ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: Ant tasks to encrypt or decrypt passwords from property files
Date Mon, 19 Jun 2006 20:45:41 GMT
OK, I see your point, although the key store has to remain 'secret'
somehow, using file-system dependent permissions I guess, otherwise
it's exposed as well. --DD

On 6/19/06, Alexey N. Solofnenko <A.Solofnenko@mdl.com> wrote:
> This can be done by requiring a key store in user home. Only people that
> have some special certificates, can encrypt/decrypt date (SSH style
> security). The decryption can be easily done with <scriptdef>. This is a
> corresponding Java code:
>
>        SecretKeySpec skeySpec=new SecretKeySpec(readAll("key"), "AES");
>        Cipher cipher=Cipher.getInstance("AES");
>        cipher.init(Cipher.DECRYPT_MODE, skeySpec);
>
>        String value=new String(cipher.doFinal(buffer), "UTF-8")
>
> It would be trivial to write a wrapper code for ANT. buffer has to be a
> byte array. I would suggest using binhex conversion.
>
> - Alexey.
>
> Dominique Devienne wrote:
> >> we would be interested in encrypting.
> >
> > But then it's a chicken-and-egg problem, no?
> >
> > Where are you going to store the passwords to decrypt the passwords
> > read from properties files? --DD
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message