Re: Encryption algorithm

From: LX-i (lxi0007_at_netscape.net)
Date: 01/09/04


Date: Thu, 08 Jan 2004 19:58:57 -0600

JerryMouse wrote:

> JerryMouse wrote:
>
>>Vik Mehta wrote:
>>
>>>I am looking for a simple encryption algorithm to encrypt a 13
>>>character alphanumeric string in a COBOL program. Any help will be
>>>appreciated.
>>
>>Find a 10-character word with no repeating letters (i.e.,
>>"manuscript") then INSPECT ... CONVERTING
>
>
> Oops. This little technique is good for converting numbers only.

How so? This is the test program I wrote using Fujitsu 3...

=-=-=-=-=

  Identification Division.
    Program-ID. ROT13.
*>_______________________________________________________________

  Data Division.
    Working-Storage Section.

  01 Test-String Pic X(13) Value Spaces.
*>_______________________________________________________________

  Procedure Division.

  Lets-Do-It.
        
      Move "FRIDAYSRGREAT" to Test-String

      Display "Before [" Test-String "]"

      Inspect Test-String
        Converting "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                to "NOPQRSTUVWXYZABCDEFGHIJKLM"

      Display "After [" Test-String "]"

      Stop Run.

=-=-=-=-=

Now, here are the results...

=-=-=-=-=

Before [FRIDAYSRGREAT]
After [SEVQNLFETERNG]

=-=-=-=-=

It found all the "A"'s and "R"'s...

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~   /   \  /         ~        Live from Montgomery, AL!       ~
~  /     \/       o  ~                                        ~
~ /      /\   -   |  ~          LXi0007@Netscape.net          ~
~ _____ /  \      |  ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~         I do not read e-mail at the above address           ~
~    Please see website if you wish to contact me privately   ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~