Protect the project. Odcl with a password

Started by Emiliano, July 11, 2012, 02:10:25 AM

Previous topic - Next topic

Emiliano

Hello everyone,
I use OpenDCL with Bricscad V12

I would love, protect the project. Odcl with a password so other users can not modify it.
I tried using the command Project-> Set Password Project, but after saving the file, it opens quietly in OpenDCL Studio without requiring a password.

Can you help me understand how it works?
Thanks in advance

roy_043

The password does not protect the ODCL file itself. However, if a password protected project has been loaded in the CAD-program the password is required for the (Project_Export) function. This prevents an embedded ODCL project from being accessed by unauthorized users.

Emiliano

Ok,
it is now clear.
According to me it would be best, however, can also enter a password to the file. Odcl

Pity that you can not do. :'(

owenwengerd

I am curious what you would do with such a file.
Owen Wengerd (Outside The Box) / ManuSoft

Emiliano

I realized very complicated dialog boxes, with attractive graphics.
It took me many hours of work.
I'm sorry that another developer can copy my work.
Even the GUI should be as important as the code behind.

roy_043

That is why you should embed your password protected project in a vlx (Autocad) or des (Bricscad) file.
http://www.opendcl.com/forum/index.php?topic=587.0
http://opendcl.com/wordpress/?page_id=10 (Beginners Tutorial)

When I compile an ODCL project I save it to a separate base64 textfile which can be created by saving this string:
Code (autolisp) Select
(setq string (dcl_Project_Export project password))
This process can be automated with a simple lisp function.

This textfile is then compiled, together with all other project files, into a single des file (or vlx file if you use AC).
For a project called "projectname" with a base64 file called "projectname_base64.txt" I use this code to load the ODCL project:
Code (autolisp) Select

(if
  (not
    (or
      (dcl_Project_Import (vl-get-resource "projectname_base64"))
      (dcl_Project_Load "projectname" 'T)
    )
  )
  (progn
    (princ "\nError: odcl dialog not found ")
    (exit)
  )
)


owenwengerd

Quote from: Emiliano on July 11, 2012, 09:55:01 PM
I realized very complicated dialog boxes, with attractive graphics.
It took me many hours of work.
I'm sorry that another developer can copy my work.
Even the GUI should be as important as the code behind.

Please answer my question. What would you do with a password protected .odcl file like you described?
Owen Wengerd (Outside The Box) / ManuSoft

Emiliano

Quote from: owenwengerd on July 12, 2012, 03:27:46 AM
Please answer my question. What would you do with a password protected .odcl file like you described?

I thought I'd responded to my previous post.
I try to explain better:
I'd like that after you set the password, you can not open the project in Studio OpenDCL without entering the password

It is now more clear?

Emiliano

Quote from: roy_043 on July 12, 2012, 12:44:41 AM
That is why you should embed your password protected project in a vlx (Autocad) or des (Bricscad) file.
http://www.opendcl.com/forum/index.php?topic=587.0
http://opendcl.com/wordpress/?page_id=10 (Beginners Tutorial)

When I compile an ODCL project I save it to a separate base64 textfile which can be created by saving this string:
Code (autolisp) Select
(setq string (dcl_Project_Export project password))
This process can be automated with a simple lisp function.

This textfile is then compiled, together with all other project files, into a single des file (or vlx file if you use AC).
For a project called "projectname" with a base64 file called "projectname_base64.txt" I use this code to load the ODCL project:
Code (autolisp) Select

(if
  (not
    (or
      (dcl_Project_Import (vl-get-resource "projectname_base64"))
      (dcl_Project_Load "projectname" 'T)
    )
  )
  (progn
    (princ "\nError: odcl dialog not found ")
    (exit)
  )
)



Thanks for your response.
I did not know you could include multiple files into one file. Des.
By the weekend, I make some tests and let you know the outcome.

roy_043

Please note that you can also put the base64 string (or list-of-strings) in the lisp file itself or in a separate lisp file.
To get a lisp file with a list-of-strings do the following:
ODCL Studio > File > Save as > Supply a filename with the .lsp extension
Check the tutorial I have mentioned for more info.

The method I have described is just the way I prefer to do this. It keeps things nicely separated.

Since there is no need to make the ODCL file available to the public, password-protecting that file is unnecessary.

You can put multiple files (lsp, dcl and txt) inside a single des file.

owenwengerd

Quote from: Emiliano on July 12, 2012, 09:31:39 AM
I'd like that after you set the password, you can not open the project in Studio OpenDCL without entering the password
It is now more clear?

I already understood that. I wanted to know what else you would do with a password protected file. Probably you are missing the purpose of my question due to the language barrier, but I think if you consider it carefully you will understand why your proposal is not practical.
Owen Wengerd (Outside The Box) / ManuSoft

Emiliano

Quote from: owenwengerd on July 12, 2012, 10:20:00 AM
Quote from: Emiliano on July 12, 2012, 09:31:39 AM
I'd like that after you set the password, you can not open the project in Studio OpenDCL without entering the password
It is now more clear?

I already understood that. I wanted to know what else you would do with a password protected file. Probably you are missing the purpose of my question due to the language barrier, but I think if you consider it carefully you will understand why your proposal is not practical.

Hello,
it is true I do not know English very well, but not I seem to find other ways to interpret the question :-(

Can you explain why my proposal is not practical?
I would like a .Odcl file protected by a password that:
- You can not open in OpenDCL Studio
- Of course you can use with the Lisp code by entering a password directly into the file. Lsp then compiled. Des

owenwengerd

If you encrypt the .odcl file so that a password is needed to open it, then you must send the password along with the file. This is the fallacy. You propose to hide the password inside the lisp file, but as you know, it is already easy to hide the entire .odcl file inside the lisp file.
Owen Wengerd (Outside The Box) / ManuSoft

Emiliano

Quote from: owenwengerd on July 15, 2012, 09:54:15 AM
If you encrypt the .odcl file so that a password is needed to open it, then you must send the password along with the file. This is the fallacy. You propose to hide the password inside the lisp file, but as you know, it is already easy to hide the entire .odcl file inside the lisp file.

Maybe I'm missing some step.
I always compiled my individual files *. Lsp in as many individual files *. Des.
I never compiled the project. Odcl: I also compile this with DESCoder?
How can I do to compile all files into one file des?

I have a little confusion ...
Can you clarify?
thanks

roy_043

Info on the DEScoder (make sure to read the Project Mode section):
http://www.lt-extender.com/LT-Extender/englisch/inhalte/DEScoder/DESCoder.htm

You cannot compile an ODCL file into a DES file. But, as explained in this thread, you can create a lsp file or a txt file from your ODCL project. And these files can be compiled into a single DES file.