[Gambas-user] need some helping hand for crypting
Charlie Reinl
Karl.Reinl at ...9...
Sun Jul 19 23:02:43 CEST 2009
Am Sonntag, den 19.07.2009, 22:21 +0200 schrieb Benoît Minisini:
> > 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.
Thanks,
no what I need is for gambas2, I have to store Passwords in an XML-file,
what means plain-text readable.
So I need a crypting/uncrypting logic .
I put my PW "TOPSECRET" to store
Print crypting("TOPSECRET")
>2sgbtf&&
and get it back by
Print uncrypting("2sgbtf&&")
>TOPSECRET
The uncrypted password is used for a database login.
or in other words
store pw in plain text encrypted, and
restore encrypted pw to plain text.
--
Amicalment
Charlie
More information about the User
mailing list