This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Author Message
Glen
Prokul Interactive


Advanced Newbie


Joined: 20 May 2003
Posts: 59

Posted: 09 Sep 2003 12:33:50 pm    Post subject:

does anyone knows how to encrypt in basic?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 09 Sep 2003 01:03:51 pm    Post subject:

Encrypt what?
Back to top
Glen
Prokul Interactive


Advanced Newbie


Joined: 20 May 2003
Posts: 59

Posted: 09 Sep 2003 10:51:11 pm    Post subject:

encrypt strings.......
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 09 Sep 2003 11:54:50 pm    Post subject:

Yes,

I have an almost perfect method; I think.
#Clear the Screen

ClrHome

#get the text to encrypt in str1

Input Str1

#Next you need a secret key let us say a number

Input A

#Seed the random number generator

A->Rand

#Create our output String; later if I am interested, I will create a routine to reencode into the same string
#I added a character becase we cannot concatnate to a null string ""
" "->Str2

#For each letter, assign a number

For(B,1,Length(Str1

#Figure out a number for each letter e.g. A=1, B=2..., assign to C
inString("ABC...Z",Sub(Str1,B,1))->C

#use the random generator the end should be the same as the maximum number of characters you use. Add it to C the letter number
RandInt(1,26)+C->C

#Make it fit e.g. 27 would loop back to 1 which is A
If C>26
C-26->C

Str2+Sub("ABC...Z",C,1)->Str2

End


I can change this to encode over the origional string, but that will take some complexity and thought, so I am not going to think about that now.

e.g.

ABCTOWNCA

replacing C with ZP would take some doing

ABZPTOWNZPA

Maybe I will work on figuring out how to do regular expressions again like I did in nimbusos b1.
Back to top
Glen
Prokul Interactive


Advanced Newbie


Joined: 20 May 2003
Posts: 59

Posted: 10 Sep 2003 11:14:17 am    Post subject:

thanks Jbirk.......... will try that!
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 10 Sep 2003 03:14:17 pm    Post subject:

If you'd like some more secure methods, mostly without a key, I know some nice encryptions, my favorite's 64 bit encryption.

Imp


Last edited by Guest on 10 Sep 2003 03:14:29 pm; edited 1 time in total
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 10 Sep 2003 06:52:57 pm    Post subject:

Yeah post them!
Back to top
Flash
Umpa Loompa


Member


Joined: 31 Aug 2003
Posts: 110

Posted: 11 Sep 2003 05:31:28 pm    Post subject:

*reads on in curiostsity*

(a spellcheck)
Back to top
62 52 53 53
Formerly known as 62 52 53 53


Active Member


Joined: 30 May 2003
Posts: 607

Posted: 12 Sep 2003 03:00:42 pm    Post subject:

I always liked the idea of encryption. Mainly to stop people from messing up your stuff, not to prevent them from getting it. Although I prefer lists.
Back to top
gorchy


Newbie


Joined: 30 May 2003
Posts: 19

Posted: 20 Sep 2003 04:36:42 pm    Post subject:

a very easy way to encrypt and decrypt would be to add 13 to the number of the letter in the alphabet; so you you could use the same algorithm to encrypt and decrypt
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 21 Sep 2003 02:54:52 pm    Post subject:

64 bit encryption -

http://www.cpp-home.com/tutorial.php?102_1

Tutorial explained, then coded in C++.

Ummm the add 13 to the letter thing, first of all, people would break that in a second, second of all, make that .2 of a second since you just told everyone that you're gonna do that :)

Imp
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 22 Sep 2003 12:41:19 am    Post subject:

what is the difference between 64 bit and 128 bit other than the level? i mean, what is the difference in the alogorithms?
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 22 Sep 2003 02:36:46 pm    Post subject:

Im not sure, do to me never learning 128 bit.

Imp
Back to top
JesusFreak
JesusFreak


Active Member


Joined: 17 Jun 2003
Posts: 537

Posted: 23 Sep 2003 05:07:58 pm    Post subject:

Just do a layered coding (is that what 64 bit is b/c i have no idea what that is) ie.
If your message was "ABC", then you would change A to 1, B to 2, C to 3, as so on, so now our message is "123", then your layered code would change a 1 to 42. 2 to 68, and 3 to 97 (all random numbers), so now our message is "426897", then it would change 42 to 456, 68 to 273, 97 to 304, so now our message is "456273304", then it would do, 456 to 1092, 273 to 3940, 304 to 3048, so now our message is "109239403048", then you would change 0 to "a", 1 to "b", 2 to "c" and so on, (yes all lower case), so mow our message is "bajcdjeadaei", then once again it would change "a" to 1, "b" to 2, "c" to 3 and so on, so the finished message is, "2,1,10,3,4,10,5,1,4,1,5,9" (i started to put commas in so you can see the different numbers, but each one would be stored in to a list or what not) then your friend would have to put in those # (or who ever is using this), the program would then trans late the numbers back to your message of "ABC"
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 24 Sep 2003 09:52:09 am    Post subject:

That woudln't work unless you stored the seed of the random number generator after each change.
Back to top
JesusFreak
JesusFreak


Active Member


Joined: 17 Jun 2003
Posts: 537

Posted: 26 Sep 2003 05:39:44 pm    Post subject:

you would need to store the #'s in a list, i will try it in a few mins...
Back to top
Toksyuryel
Crimson Dragon Software


Elite


Joined: 14 Jun 2003
Posts: 880

Posted: 26 Sep 2003 07:04:47 pm    Post subject:

I can encrypt pics with a random code, and then decrypt them using that same code. Anyone want the source?
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 28 Sep 2003 11:36:18 pm    Post subject:

i need a pic compression routine! that stores the output in a list. objective: output is 768 bytes or less...
Back to top
Toksyuryel
Crimson Dragon Software


Elite


Joined: 14 Jun 2003
Posts: 880

Posted: 29 Sep 2003 09:46:31 am    Post subject:

I can do it in about 400 if I can just figure out how to look at individual digits in a number...
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 29 Sep 2003 04:26:35 pm    Post subject:

thats easy.
if you want the 100's place of : 455 (so 4) you would do (pretend thats in A and we want the 100's place in B ) :

Code:
int(A/100->B
Very Happy

Last edited by Guest on 29 Sep 2003 04:26:52 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Page 1 of 3 » All times are UTC - 5 Hours

 

Advertisement