Exemplo n.º 1
0
        protected DataBaseCompactConnection()
        {
            connectionConfig = new Encrypter().DecryptText(
                               ConfigurationManager.ConnectionStrings["RopSqlConnStr"].ConnectionString);

            cultureAcronym = ConfigurationManager.AppSettings["RopSqlCulture"];

            connection = new SqlCeConnection(connectionConfig);

            transactionControl = null;
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        public static bool ValidatePassword(string cryptoPwd, string pwd)
        {
            Encrypter cripto = new Encrypter();

            return cryptoPwd.Equals(cripto.EncryptText(pwd));
        }