Hello Alexey,

thanks, this is interesting. I will try it.

I was also thinking about another solution, which would be to encrypt/decrypt 
using GnuPG, and have GnuPG-agent supply the passphrase.

This would be used on a server where AnthillPro is running.

I wonder whether this supplying of passphrases by agents is supported by 
BouncyCastle. 


Regards,

Antoine

-------- Original-Nachricht --------
Datum: Mon, 19 Jun 2006 13:20:26 -0700
Von: "Alexey N. Solofnenko" <[EMAIL PROTECTED]>
An: Ant Users List <[email protected]>
Betreff: Re: Ant tasks to encrypt or decrypt passwords from property files

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to