Re: [Vala] encrypt decrypt



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.
I've only used vala for 3 days, before that PHP.
Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES 
DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]