protected DataBaseCompactConnection() { connectionConfig = new Encrypter().DecryptText( ConfigurationManager.ConnectionStrings["RopSqlConnStr"].ConnectionString); cultureAcronym = ConfigurationManager.AppSettings["RopSqlCulture"]; connection = new SqlCeConnection(connectionConfig); transactionControl = null; }
internal static bool[] getBinaryProfileKey(string profileKey) { BitArray arrayDecryptedKey = null; byte[] preDecryptedKey = new byte[AccessValidator.ProfileKeySize]; bool[] decryptedKey = new bool[AccessValidator.ProfileKeySize]; Encrypter cripto = new Encrypter(); preDecryptedKey = cripto.DecryptText(ref profileKey); arrayDecryptedKey = new BitArray(preDecryptedKey); arrayDecryptedKey.Length = AccessValidator.ProfileKeySize; arrayDecryptedKey.CopyTo(decryptedKey, 0); return decryptedKey; }
public static bool ValidatePassword(string cryptoPwd, string pwd) { Encrypter cripto = new Encrypter(); return cryptoPwd.Equals(cripto.EncryptText(pwd)); }