Re: database password in settings.py
On 5 Sty, 17:49, Eric Chamberlain <e...@rf.com> wrote:
> There's nothing special about settings.py. You could do something like:
>
> from Crypto.Cipher import Blowfish
>
> blowme = Blowfish.new(SECRET_KEY)
> DATABASE_PASSWORD = blowme.decrypt(ENCRYPTED_PASSWORD)
>
> Securing SECRET_KEY is left as an exercise for the reader.
It's piece of cake:
blowme0 = Blowfish.new(SECRET_KEY0)
SECRET_KEY = blowme0.decrypt(ENCRYPTED_SECRET_KEY)
;-)
--
Tomasz Zielinski
http://pyconsultant.eu
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home