Article View: aus.computers.java
Article #1033Re: need help in java assignment
From: Hydra
Date: Sun, 10 Oct 1999 00:00
Date: Sun, 10 Oct 1999 00:00
31 lines
2184 bytes
2184 bytes
In article <%oTL3.1530$_4.2805@newsfeeds.bigpond.com>, jywang@bigpond.com barfed... > The requirement follows: > "The server implements a simple Caesar-like cipher (an example of which is > given in Tannenbaum, 3rd Edition, p582) on the usual set of alphabet and > punctuation characters. All characters in this set are encoded by shifting > their position by thirteen places -- hence this cipher is popularly called > "rot13". Control characters need to be handled carefully, but (as a general > rule) are not encoded and may be discarded by the client or server. Once > again, some care needs to be taken in defining which characters can be > removed and which cannot." > more detail can be found at > http://www.cse.unsw.edu.au/~cs9331/Assignments/project.html. > > Any advice on how to implement this most appreciated. EBG13 vf fvzcyr. Nyzbfg nal arjfernqre pna qb vg. There are numorous ways to _implement_ ROT13 but the idea is simple. Get a character from a String, get the character 13 steps to the left and place it back. A -> N, B -> O, Z -> M. You should be able to figure the algorithm out yourself. Nils -- /* * Mail hydra1ms@wxs.nl * "Yours is not to question why, yours is just to do and die" */
Technical Details
Message-ID:
<MPG.126a8bc2a2f44122989d9e@news.wxs.nl>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<%oTL3.1530$_4.2805@newsfeeds.bigpond.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113ae9,8f9c4fad86570e11 X-Google-Attributes: gid113ae9,public X-Google-Thread: 10a146,8f9c4fad86570e11 X-Google-Attributes: gid10a146,public X-Google-Thread: 10d6db,8f9c4fad86570e11 X-Google-Attributes: gid10d6db,public X-Google-Thread: 115d3b,8f9c4fad86570e11 X-Google-Attributes: gid115d3b,public From: hydra1ms@wxs.nl (Hydra) Subject: Re: need help in java assignment Date: 1999/10/10 Message-ID: <MPG.126a8bc2a2f44122989d9e@news.wxs.nl> X-Deja-AN: 534967353 References: <%oTL3.1530$_4.2805@newsfeeds.bigpond.com> X-MimeOLE: Produced bij Niels' Spam-O-Matic X-Complaints-To: abuse@wxs.nl X-Trace: reader2.wxs.nl 939551900 657085 195.121.146.161 (10 Oct 1999 10:38:20 GMT) Organization: Planet Internet NNTP-Posting-Date: 10 Oct 1999 10:38:20 GMT Newsgroups: aus.computers.java,comp.lang.java.help,comp.lang.java.programmer,comp.lang.java.security