Exemplo n.º 1
0
        public string GetData(string key)
        {
            SqlCommand command = new SqlCommand("SELECT [Data] FROM QuickCopy.Users WHERE ID = @UserID", conn);

            command.Parameters.AddWithValue("@UserID", userID);
            object ret = command.ExecuteScalar();

            return(ret.Equals(DBNull.Value) ? null : EncryptionHandler.Decrypt(key, (byte[])ret));
        }
Exemplo n.º 2
0
 public string GetData(string key)
 {
     return(EncryptionHandler.Decrypt(key, File.ReadAllBytes(Path)));
 }