public string Decript(string text, string chave) { try { String iv = "EcoSistemas12345";//CryptLib.GenerateRandomIV(16); string key = CryptLib.getHashSha256(chave, 31); String cypherText = decrypt(text, key, iv); return(cypherText); } catch { return(null); } }
public string Encript(string text) { try { String iv = "EcoSistemas12345"; CryptLib.GenerateRandomIV(16); //"aa5573638eae0a34";// //16 bytes = 128 bits string key = CryptLib.getHashSha256("WebEleitor1234", 31); //32 bytes = 256 bits String cypherText = encrypt(text, key, iv); return(cypherText); } catch { return(null); } }