How to encrypt TCL Script?

Bhavik Sheth_21143
Bhavik Sheth_21143 Altair Community Member
edited February 2024 in Community Q&A

Hello Team,

I have developed one script for weld connections.

But before giving to the user, I want to encrypt the script.

So, how to achieve this?

Any help will be great.

 

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

Answers

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited September 2023

    As far as I know there are no longer recommended ways to encrypt tcl files. There were, and are, some ways out there but there were security issues and are therefore not recommended.  Compose, C++ and Python can all be encrypted/compiled.  So if encryption is critical you might try a different language.  A web search for py_compile and compileall will give you more information on Python compiling. 

  • QNGUYENDAI
    QNGUYENDAI Altair Community Member
    edited September 2023

    TDK (Tcl Dev Kit) ?

  • Bhavik Sheth_21143
    Bhavik Sheth_21143 Altair Community Member
    edited September 2023

    Thank you for the information @Ben Buchanan and @Quy Nguyen Dai .

    I have developed one shell weld connection script and want to deploy it for user's use.

    So, any information on deployment will be a great help.

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited September 2023

    Thank you for the information @Ben Buchanan and @Quy Nguyen Dai .

    I have developed one shell weld connection script and want to deploy it for user's use.

    So, any information on deployment will be a great help.

    I prefer to use extensions to deploy scripts.  Check out my blog below for more information on extensions.
    https://community.altair.com/community?id=community_blog&sys_id=f497a24b97d87d10e3b0361e6253aff9

  • Bhavik Sheth_21143
    Bhavik Sheth_21143 Altair Community Member
    edited September 2023

    @Ben Buchanan As you have mentioned about python.

    Is it possible to do scripting python for Hypermesh macro.

    IS API of python available?

    Please guide as I am new to this.

     

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited September 2023

    @Ben Buchanan As you have mentioned about python.

    Is it possible to do scripting python for Hypermesh macro.

    IS API of python available?

    Please guide as I am new to this.

     

    Unfortunately no. Python API is coming to HM but not released yet.  So as with Compose and C++ you would have to incorporate the tcl HM api commands somehow into your code. Python api is available in other Altair products like inspire (see below)

    https://help.altair.com/inspire/en_us/topics/inspire/reference/python_api_c.htm?hl=python

  • Vladimir_Gantovnik
    Vladimir_Gantovnik Altair Community Member
    edited October 2023

    1) What about binary *.tbc files? Hypermesh can run tbc files. Do we still have converter? It was part of TclPro, but now.... 

    2) It is possible to use encryption using \hwsolvers\optistruct\bin\win64\os_encrypt_win.exe Read about it in this chapter of help: /help/hwsolvers/os/topics/solvers/os/run_os_encryption_r.htm It could be useful.

    For example, you can hide some materials properties: MAT1 card

    MAT1    120     1.E6          0.0     3.57      1.0e-4          35.E3   35.E3   23.E3

    with 

    /ENCRYPT/ZB001 1GcxRn2nMRIp575cxxQrdIBaZYBB6oPGNhPJh4lAZOH9HdVivEeMVIGEJWJM5T0q6O3zzUH3KyJRJ5OOjx6ojdd9OjHT4C63ko2I %ZB001MGoRMaLooUWUaHxbHHbErfqmYfVVMh9h2TgKcZvYw13940WzdJv0cS2KuK77XBDGBvyMtNikHbfwlaasrGdSkKAZZrEdrP %ZB001gbGGRgQ0GQMCYNi4HIdcbTbCFWcJDnCH7UfhSwwjZTammusHl9juHaAT5pxPeNVdkwv9OqH44OTmv5XeiD1uaSxTNH2u8i %ZB001P0av0XqspIeqUWja5CVLjvismTRhTLOPOmTJyK3FPyeh77evhjFZxmANrKrdXpoML6xTMkK8emlwoN9vYumaBvqRLsg8zs %ZB001H80ZXXnnhZ6cViaSBly3G4xhptIpGKWYjyXThW7R1ERUrmBjxBq7mpKX5hno4LdLitUvMUjOlSFJYy507eyyakjnKtzvU7

    and hypermesh will understand it.

  • Bhavik Sheth_21143
    Bhavik Sheth_21143 Altair Community Member
    edited October 2023

    Unfortunately no. Python API is coming to HM but not released yet.  So as with Compose and C++ you would have to incorporate the tcl HM api commands somehow into your code. Python api is available in other Altair products like inspire (see below)

    https://help.altair.com/inspire/en_us/topics/inspire/reference/python_api_c.htm?hl=python

    Thanks for the information.

  • Bhavik Sheth_21143
    Bhavik Sheth_21143 Altair Community Member
    edited October 2023

    Hello all,

     

    I have used TCLPro setup to convert .tcl file to .tbc.

    And it's working good in HM 2022.3

  • Vladimir_Gantovnik
    Vladimir_Gantovnik Altair Community Member
    edited November 2023 Answer ✓

    Hello all,

     

    I have used TCLPro setup to convert .tcl file to .tbc.

    And it's working good in HM 2022.3

    Yes, TclPro now is in https://sourceforge.net/projects/tclpro/ 

    image

  • Pavitharan V_21500
    Pavitharan V_21500 Altair Community Member
    edited February 2024

    Hello all,

     

    I have used TCLPro setup to convert .tcl file to .tbc.

    And it's working good in HM 2022.3

    Hey @Bhavik Sheth I am unable to install TCL Pro kindly guide me.

     

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.