[Gambas-user] need some helping hand for crypting

Benoît Minisini gambas at ...1...
Sun Jul 19 22:21:21 CEST 2009


> Charlie Reinl a écrit :
> > Salut,
> >
> > I have to store passwords in easy reading files (xml), and need fopr
> > that crypting/uncrypting functions, gb.crypt I can crypt , but not
> > restore them.
> > Any hints?
>
> what's exactly your needs (restore plain p/w or not?)
>
> I don't use this but I guess what it does is calculating a hash
> that is repeatable; so once you've stored th hash, you can input a p/w from
> user, hash it and compare hashes (to hashes :) to see if they match.
>
> This has the big advantage that in case of breaking in, nobody can
> trace back to the plain login.
>
> JY

In Gambas 3, you can use the gb.desktop component to store and retrieve 
passwords:

Desktop.Passwords["Key"] = "Password"
...
Print Desktop.Passwords["Key"]

The requirement is using Gnome, KDE 3 or KDE 4, because the passwords are 
stored in the Gnome keyring (on Gnome) and in the KDE wallet (on KDEs).

I use that in the Gambas 3 IDE to store database passwords.

Regards,

-- 
Benoît




More information about the User mailing list