Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started by: HybridFox on November 04, 2013, 03:17:36 pm
-
So i made this program "SimCity47" And i want to Distribute it with my friends, but since i and my friends are in a coding school, the will probably start cheating with it and chaging the vars and lists, so anyone knows a good way to protect lists?
Thnx in advance ^-^ ::)
-
I don't think there is a way with TI-BASIC, sorry.
-
I don't think there is a way with TI-BASIC, sorry.
Isnt there also a way to like copy the list, reverse the order and save it to like example "LCS47B" and then when u run the program, it unreverses it and checks if the 2 lists are the same?
-
That would be implementing your own 'encryptions' for that list, you could of cource do that and come up with your own algorythm for it ;)
-
Hmmmmm, well i would sure think of that ;) it just i never worked with encryption :/
-
another posibility would be to use basic libs and store your data to an app-variable so that they can't modify it, or, if you don't want to stick with basic you could start learning axe and create your own data-structures :)
-
How about a simple checksum? For example, append -Sum(list) to the end, then when loading you can check whether the sum is zero (or with some tolerance, if necessary)
-
another posibility would be to use basic libs and store your data to an app-variable so that they can't modify it, or, if you don't want to stick with basic you could start learning axe and create your own data-structures :)
I know axe a bit, and i learned it, but i just don't like it, i prefer to code in asm on my PC
How about a simple checksum? For example, append -Sum(list) to the end, then when loading you can check whether the sum is zero (or with some tolerance, if necessary)
Not a bad idea, i'll try that
-
There is basically no protection against knowledgeable TI-BASIC programmers. However, if you think they will be too lazy to check the source code, you could use some kind of checksum method. For example, if the list is always 25 elements of the data, the 26th element could work as the checksum:
0→L1(26
sum(L1
Ans-247iPart(Ans/247→L1(26
Then to see if the data has been tampered with:
L1(26→A
sum(L1)-A
If A≠(Ans-247iPart(Ans/247
Return
However, that won't prevent a user from incrementing one list element and then decrementing the next. For that, you could do something more complicated like squaring each element, adding 1, then multiplying all of the elements together, modulo 247 and use that to check if the data has been tampered with.
-
I think that will do ;) they are indeed lazy enough to check the source code, thanx for the help ^-^
-
If someone can see the source encryption of any kind is no use :P
-
If someone can see the source encryption of any kind is no use :P
I know, but my classmates are to lazy to find the encryption code, or i just protect the program ;P
-
You do need to consider if the number of elements being change will cause any dim errors. You could make a second list that holds the sum and a 1 or 0. You could then get the sum of the variables list check it to the othe r list and if the send element is 0 ignore results if 1 exit the program. If you lock the program then you could force a divide by zero error to frustrate their lazy effort to even change the list in the first place, they will tet a divide error and can't even enter the source to remove it.
-
How about private key encryption? This way the program can read the data using a public key, but for editing you need a private key. Look it up on google.
-
How about this :
1. Set up list
{1,2,3,4->L1
2. Take the list and turn it into a matrix:
For(I,1,4,1
L1(I)->[A](I,1
end
3. Rotate the numbers around a bit
For(I,1,4,1
rowSwap([A]
end
4. Store back to list
Matr►list([A],L1
5. Delete Vars
Delvar[A]DelvarL1DelvarI
6.???
7. PROFIT.
-
The problem is, i have a game, and during the game it saves over 100 vars, it doesnt save like on one point everything, and that's mostly the problem, i should think of brigning a save function in...
-
Yea for something that big you'd just need a lib to convert list > appvar, that seems the best way to do it.