From: Simone.Rapisarda@p10.f800.n33.z2.fidonet.org (Simone Rapisarda)
Newsgroups: comp.sources.hp48
Subject: v04i034:  coder_sr - A fast and little string coder/decoder (using chiper keys) v1.3, Part01/01
Date: 26 Mar 92 02:44:41 GMT
Followup-To: comp.sys.hp48
Organization: Univ. of North Carolina @ Wilmington

Checksum: 2109296420 (verify with brik -cv)
Submitted-by: Simone Rapisarda <Simone.Rapisarda@p10.f800.n33.z2.fidonet.org>
Posting-number: Volume 4, Issue 34
Archive-name: coder_sr/part01

BEGIN_RDME coder.rdm
This is a string coder/decoder I posted months ago to comp.sys.hp48.
I don't know if I'm making the right thing but here it is again.

Just some thanks:
Thanks to Jurjen that showed me the problems with the first version of CODER
and also that it's not so impossible to find the key.
Thanks to Jim Cloos that ported my CODER in system-RPL.
There was a typo in Jim's CODER, just a "D" instead of a "0".
The following version works correctly.

ciao

                                                  RAP

END_RDME

BEGIN_DOC coder.doc

Do you keep any top-secret data in your 48 ?

If yes, the following  internal RPL program will be very useful to you.


                                 C O D E R
                                 ---------

                                version 1.3

                          STRING CODER & DECODER

                                    by

                             Simone Rapisarda


CODER requires two arguments: a string to de/code on level two and a cipher
key-string on level one.
If the arguments are not strings CODER will change them in strings before
coding.
The two strings can be of any length, the longer is the cipher key the safer
the result string is. If the cipher key-string is longer than the string to
de/code it will be truncated.
The algorithm used is very simple. The program is only 63 bytes long. The
coding of a 1000 character string with a 5 character cipher key takes about
.16 seconds.


                               USAGE 1

|3:                        |             |3:                        |
|2:        "String to Code"|             |2:                        |
|1:            "Cipher Key"|    ---->    |1:          "Coded String"|
|CODER ### ### ### ### ### |             |CODER ### ### ### ### ### |
+=====---------------------+             +--------------------------+



                               USAGE 2

|3:                        |             |3:                        |
|2:      "String to Decode"|             |2:                        |
|1:            "Cipher Key"|    ---->    |1:        "Decoded String"|
|CODER ### ### ### ### ### |             |CODER ### ### ### ### ### |
+=====---------------------+             +--------------------------+


Happy Coding!

                                                   RAP


--  
 WolfNet BBS Pisa (Italy) Tel. +39-50-589050 300-14.4K Baud Matrix 2:332/602.0
 Simone Rapisarda - via FidoNet node 2:33/800
 UUCP: ...!gear!wolf!800.10!Simone.Rapisarda
 ARPA: Simone.Rapisarda@p10.f800.n33.z2.fidonet.org

