[Closed] Max 9 SP1 encryption
Hi all,
among all of the chnages in SP1 was a better encryption method for MAXScript. Is this backwards compatible? Because I’m having a problem with one of my encrypted scripts, and it looks like it will now only work if it is run in Max 9 with the Service Packs…
If it isn’t backwards compatible, is there any way of using the old encryption method so that the script can also be run on other Max versions?
Dave
Hi Paul,
if there’s no other way of getting it working in older versions, that’s what I’m going to have to do…
Dave
encryptScript infilename version:<int>
0 – for old version
1 – for new version (i.e. Max 9 SP1 and after)
Thanks Chris! That’s exactly what I wanted to hear :o)
Is this documented anywhere? Because none of my MAXScript documentation got updated when I installed the Service Pack…
Dave
Thanks Bobo, I thought I was going blind looking for the changes in the service pack…
Dave
Interesting,
I have an issue here using ‘encryptScript’
Max 9 32 – SP2
Win XP SP2
consider this test Script:
--------------------
-- Just a test --
-- Test_Script.ms
--------------------
(
global TestRollout
try (destroydialog TestRollout ) catch()
rollout TestRollout " Just a Test "
(
group ""
(
button btn_PushMe "Push Me !"
)
button close "Close"
on btn_PushMe pressed do
(
format "btn_PushMe was pressed.
"
b=box()
convertTo b editable_poly
)
on close pressed do destroydialog TestRollout
)
createdialog TestRollout
)
I then encrypt using:
encryptFile "Test_Script.ms" "Test_Script.mse" 123456
When I try to run Test_Script.mse, I get an error:
-- Syntax error: at bad, expected <factor>
-- In Line:
but when I run
f=openEncryptedFile "Test_Script.mse" 123456
while not eof f do format "%
" (readline f)
close f
The listener gives correct output (Ie the Script)
If I use
encryptScript "Test_Script.ms"
and then run the mse, all is fine…
What’s going on ???
Anyone has a clue ?
Is it me ?
or is there an issue with the ‘encryptScript’ fn ?
Otherwise, as Paul Wrote:
You might want to encrypt it on an older version of max.
…
The encryptFile and encryptScript functions serve a different purpose. The encryptFile function is not meant to create mse files, but to encrypt (data) files that can be read in again using the supplied key. encryptScript on the other hand is only used to encrypt scripts to mse files which can be executed by max. The latter also doesn’t need a key for encryption/decryption.
Martijn