Shuffling a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I need a suggestion, or guidance of how to work this. I'm recreating a
Jefferson Wheel (or wheel cypher) and using a PHP script to generate the
random strings that go on each wheel.You can read more about the Jefferson
Wheel here:
http://www.monticello.org/site/research-and-collections/wheel-cipher )

The simple method is to set a phrase on the wheels, rotate it to a random
spot and write down the cypher and pass it on to the recipient with the
wheel order. However I want to add complexity to this rather simple method
by having someone solving different cyphers before coming to the ultimate
phrase solution. Something along the lines of:

- set initial cypher which gives a phrase - this phrase is a clue to the
next cypher, however that next cypher is a pre-defined cypher (as opposed
to the random one set at the first step)
- once that second cypher is set, the final solution is revealed, OR it's
again a clue to the next one.

This allows me to have multiple intermediary steps before getting to the
final solution. However, those intermediary steps would need to have both
the "solved" phrase as well as the pre-determined cypher "visible" on the
wheels.  I can't simply shuffle the string and hope to have both. So I'm
trying to figure out how to do the shuffling where I can have both phrases
on the set of wheels with everything else shuffled.

Simply shuffling for a one-step solution is easy enough, just run the
string through str_shuffle() and call it done. But how can I pass it a
phrase, or rather two phrases where it can then use them on the number of
available wheels before shuffling the remaining letters?

Hope this makes sense ...

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux