Currently Ship Storage Helper doesn't handle store & retrieving ships with shield cycler devices succesfully.
To solve this i am adding methods for storing & retrieving shieldcycler values in JSON format to Shield Cycler oxp.
These methods can be used by any oxp, and i want to verify they were created by SC and not changed after exporting them.
I was thinking of using MD5 checksumming for this, but javascript doesn't appear to have such functionality build in.
I found many implementations of MD5 for node.js, but sofar none for javascript itself.
Cabal Common Library does have a strGetCRC function, but i'm not sure if it's powerful enough to detect small changes.
How do other scripters deal with this ?
Checksummming in scripts
Moderators: winston, another_commander
Checksummming in scripts
OS : Arch Linux 64-bit - rolling release
OXPs : My user page
Retired, reachable at [email protected]
OXPs : My user page
Retired, reachable at [email protected]
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Checksummming in scripts
Is this of any help?
https://github.com/blueimp/JavaScript-M ... /js/md5.js
https://github.com/blueimp/JavaScript-M ... /js/md5.js
Re: Checksummming in scripts
CCL also shipsLone_Wolf wrote:Cabal Common Library does have a strGetCRC function, but i'm not sure if it's powerful enough to detect small changes.
strEncrypt()
and strDecrypt()
, but it's not MD5.Re: Checksummming in scripts
strEncrypt() and strDecrypt() look useful, though not for checksumming.
another_commander, that link helped a lot.
I have some doubts about the MIT licensing the author uses, as it's based on code that uses BSD license.
I checked the site mentioned, and found http://pajhome.org.uk/crypt/md5/scripts.html .
Downloaded the jshash-2.2 zip file , and found the original code .
I'm looking into adapting the MD5 code to Oolite JS now.
Since this could be useful for other oxpers, i'll create a separate oxp for it which will keep the BSD license.
another_commander, that link helped a lot.
I have some doubts about the MIT licensing the author uses, as it's based on code that uses BSD license.
I checked the site mentioned, and found http://pajhome.org.uk/crypt/md5/scripts.html .
Downloaded the jshash-2.2 zip file , and found the original code .
I'm looking into adapting the MD5 code to Oolite JS now.
Since this could be useful for other oxpers, i'll create a separate oxp for it which will keep the BSD license.
OS : Arch Linux 64-bit - rolling release
OXPs : My user page
Retired, reachable at [email protected]
OXPs : My user page
Retired, reachable at [email protected]
Re: Checksummming in scripts
I've read up a bit on compatible licenses, and it is allowed to publish BSD code under several other licenses including MIT & GPL as long as you keep the original copyright notice in the files.
Adapting the code to oolite is more work then i thought and i don't really want to include code with another license then CC in Oolite oxp.
Besides, for my purpose strEncrypt() and strDecrypt() from CCL can do the job.
Adapting the code to oolite is more work then i thought and i don't really want to include code with another license then CC in Oolite oxp.
Besides, for my purpose strEncrypt() and strDecrypt() from CCL can do the job.
OS : Arch Linux 64-bit - rolling release
OXPs : My user page
Retired, reachable at [email protected]
OXPs : My user page
Retired, reachable at [email protected]