Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

zek152's scratchpad

by zek152 (Pilgrim)
on Jun 14, 2010 at 15:30 UTC ( #844636=scratchpad: print w/replies, xml ) Need Help??

Excerpt from HOP sub tokens { my $target = shift; return sub { TOKEN: { return ['INTEGER', $1] if $target = /\G (\d+) /gcx; return ['PRINT'] if $target = /\G print \b /gcx; return ['IDENTIFIER', $1] if $target = /\G ([A-Za-z_]\w*) /gcx; return ['OPERATOR', $1] if $target = /\G (\*\*) /gcx; return ['OPERATOR', $1] if $target = /\G ([-+*\/=()])/gcx; return ['TERMINATOR', $1] if $target = /\G (; \n* | \n+) /gcx; redo TOKEN if $target = /\G \s+ /gcx; return ['UNKNOWN', $1] if $target = /\G (.) /gcx; return; } }; } ----------------------------------------------------- cipher text 1 ciphertxt2 ciphertxt3 | | | +-------------+ +----------+ +---- | | | | | key--decryption | decrypt | decrypt | | | | | -------X +--X +----------X | | | plaintext 1 plntxt2 plntxt3

If you modify cipher text 1 it is obvious that plaintext 1 will change. Plaintext 2 will also change because of the XOR with ciphertext 1 (following the decryption). Ciphertext 2 is not different though (nor is ciphertext3) so plaintext 3 will not be different.

Log In?

What's my password?
Create A New User
Corion idly wonders if there is a way to produce ordered .yml files. I want to accept YAML for a configuration file format, but I also want to generate (for debugging/start) a sample configuration file from the current configuration.
[Corion]: Ideally, that configuration file would have some order of the keys, but I'm not sure whether/how YAML supports ordered output.
[Corion]: Basically I have this metadata and generating a purposeful example is much better if the output is ordered in the same way the documentation is ordered

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2017-01-16 11:58 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (149 votes). Check out past polls.