Re: [Vala] encrypt decrypt
- From: Evan Nemerson <evan coeus-group com>
- To: "\"Luis L." Rodríguez "Oro\"" <luisr uci cu>
- Cc: "vala-list gnome org" <vala-list gnome org>
- Subject: Re: [Vala] encrypt decrypt
- Date: Sat, 22 Oct 2011 10:40:38 -0700
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"<luisr uci cu>
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]