On Sat, 2011-10-22 at 12:40 -0400, "Luis L. Rodríguez Oro" wrote:
> El 22/10/11 11:05, pancake escribió:
> > What do you want from us? Implement a criptografic algorithm for
> you?
> >
> > There are several criptographic algorithms to do that. Check
> wikipedia.
> >
> > If you do not specify the algo we cant help, as long as its your own
> choice and your choice to implement it from scratch or use any of the
> available opensource libraries out there.
> >
> > On 22/10/2011, at 16:52, "Luis L. Rodríguez Oro"<[email protected]>
> wrote:
> >
> >> I need encrypt and decrypt come text:
> >>
> >> string decrypt(string text, string password){
> >> // code
> >>
> >> return decrypted;
> >> }
> >>
> >>
> >> string encrypt(string text, string password){
> >> // code
> >>
> >> return encrypted;
> >> }
> >>
> >> void main(){
> >>     string text = "hello word";
> >>     string pass = "p4ssw0rd";
> >>
> >>     string enc = encrypt(text, pass);
> >>     print("%s\", enc);
> >>
> >>     string orig = decrypt(enc, pass);
> >>     print("%s\",orig);
> >> }
> >>
> >> I appreciate any help.
> >> Thanks for every body.
> >> Luis
> >>
> >>
> 
> I only need encrypt some password to save to configuration.conf, I need 
> decrypt the password to used, MD5 don't work to me. I prefer use some 
> library.

Like Alexandre mentioned elsewhere in this thread, libgcrypt will do
what you are asking for.

That said, you should be aware that saving passwords securely is really
a complex problem--you should try to avoid it, unless you *really* know
what you are doing. If I were you, I would take a very serious look at
using GNOME Keyring <https://live.gnome.org/GnomeKeyring>. There are
Vala bindings distributed with Vala.


-Evan

_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to