Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2005

Tip: Looking for answers? Try searching our database.

--really newbie-- most frequent character

Thread view: 
Gin - 28 Apr 2005 02:48 GMT
Hi everyone,

I struggling with java here. Can anyone tell me how to pick up the most
frequent character in a string?
I've browsed the API but I am just lost.

What I intend to do is decrypt a string without a code given? Like
there's a most frequent letter in english which is 'e' so i want to
pick the most frequent letter from the encrypted string and assign it
'e'.

A bit messy, but I hope you get the idea.

Thank you so much!
MA - 28 Apr 2005 09:15 GMT
There is a program here which sorts through various phrases and
determines the frequency of all the letters. You be able to do
something with this

http://www.cadenhead.org/book/24java/source/chapter09/Wheel.java
Fred L. Kleinschmidt - 28 Apr 2005 16:19 GMT
> Hi everyone,
>
[quoted text clipped - 10 lines]
>
> Thank you so much!

I hope you realize that only the most naive encryption methods use a
simple letter substitution scheme. Essentially every encryption method
in use today is quite different than that. For example, the encryption
of the string "aaaaa" will probably not be 5 characters long; it is more
likely to be something like "zyQ:5jnW7Wm"

Signature

Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94  (206)544-5225

John - 29 Apr 2005 02:42 GMT
It depends on the way the keys are handled. For example using a
symetrical encryption algorithm
using XOR can be really hard to break if only the two people
communicating are using the key and
the key is long enough. The key elements have to be applied in sequence
on the original sequence.
This means that if you have the same character on a number of positions,
chances that it will show
up with the same substitution are slim. There's really no way of
breaking the code using the method
you are trying to use.

>>Hi everyone,
>>
[quoted text clipped - 16 lines]
> of the string "aaaaa" will probably not be 5 characters long; it is more
> likely to be something like "zyQ:5jnW7Wm"


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.