In Ruby, I am building a "One Time Pad" Cipher for a project. Although, I already ran into something that I am not familiar with how to do. I need to change a character to an integer and then add an random number.
For the random number, I'll just use rand and then add that to the character. But how do I make the character into an integer that matches the value of that character (A = 1, B = 2, C = 3, etc.). Then how do I add the value of the random number to the character (which has been changed into an integer), and then change the sum of those two back into a character?
Thanks.