home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / sci / crypt / 7176 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.4 KB  |  41 lines

  1. Newsgroups: sci.crypt
  2. Path: sparky!uunet!tcsi.com!iat.holonet.net!news.cerf.net!usc!howland.reston.ans.net!bogus.sura.net!udel!sbcs.sunysb.edu!hanche
  3. From: hanche@ams.sunysb.edu (Harald Hanche-Olsen)
  4. Subject: Re: Toggle rot-13 decode..
  5. In-Reply-To: frank@hsr.no's message of Wed, 27 Jan 1993 09: 44:56 GMT
  6. Message-ID: <HANCHE.93Jan27134217@ptolemy.ams.sunysb.edu>
  7. Sender: usenet@sbcs.sunysb.edu (Usenet poster)
  8. Nntp-Posting-Host: ptolemy.ams.sunysb.edu
  9. Organization: University at Stony Brook, NY
  10. References: <C1Ho7r.J1M@eis.calstate.edu> <1993Jan27.094456.10542@hsr.no>
  11. Date: Wed, 27 Jan 1993 18:42:17 GMT
  12. Lines: 27
  13.  
  14. >>>>> In article <1993Jan27.094456.10542@hsr.no>, frank@hsr.no (Frank
  15. >>>>> A Stevenson) writes:
  16.  
  17. Frank> Here is a small c-source that reads from standard input and
  18. Frank> writes the encrypted text to standard out. Note the cipher is
  19. Frank> symmetrical and the same routine will thus encipher and
  20. Frank> decipher a text
  21.  
  22. Frank> examples of usagege (UNIX)
  23.  
  24. Frank> %rot <infile >outfile
  25.  
  26. [ twentyish-line C program deleted ]
  27.  
  28. Hrmf.  The rot program is already there, on any Unix box.  It is
  29. called tr:
  30.  
  31. $ rot () { tr 'a-zA-Z' 'n-za-mN-ZA-M' }
  32. # for csh users: alias rot tr 'a-zA-Z' 'n-za-mN-ZA-M'
  33. $ echo 'Render unto Caesar...' | rot
  34. Eraqre hagb Pnrfne...
  35. $ echo 'Render unto Caesar...' | rot | rot
  36. Render unto Caesar...
  37.  
  38. [ I hope I am not violating the ITAR by posting this ... :-) ]
  39.  
  40. - Harald
  41.