Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Ruby Command Line One Time Pad

Name: Anonymous 2011-11-28 19:27

Sup /prog/

I'm trying to write a one time pad program in Ruby and I'm having some trouble translating what is typed (the message) with a random number (srand).

I have a = 1 A = 1 b = 2 B = 2 and so forth, but what's an effective way of having each individual letter in a sentence be converted into a number?

Thanks

Name: wat 2011-11-28 20:13

"string".each_byte do |c|
    puts c
end

herp derp

Name: Anonymous 2011-11-28 20:22

What you are describing is not OTP.

Name: Anonymous 2011-11-28 20:27

>>3
True, the real OTP is ShinjixKaworu.

Name: Anonymous 2011-11-29 1:45

why is /prog/ suddenly full of so much anime faggotry

Name: Anonymous 2011-11-29 13:41

Why is /prog/ full of so much non /prog/ related stuff? :|

Name: F r o z e n V o i d !!mJCwdV5J0Xy2A21 2011-11-29 14:14

>>6
because its
1.public
2.on 4chan
If you made your own /prog/ it wouldn't be used by anyone and who would randomly visit it?

Don't change these.
Name: Email:
Entire Thread Thread List