![]() But whenever I try to decrypt, I get a different message from what I initially inputted. I was able to do the encryption part already. This is after converting my OTP array to corresponding letters of the alphabet depending on each element's randomized assigned number. The logic of my encryption is that since the size of my OTP array is equal to the length of my message, I would do XOR on each of the character of my message and my OTP. 25 would signify the letter 'y' and so on. My OTP array, since each element is randomized between 1-26, would signify an nth letter of the alphabet. The size is equal to the length of the message to be encrypted. This function produces random numbers from 1-26 (to signify the english alphabet) and would be stored in an array of integers. Initially, to encrypt a message, I would have to use a function that would generate my OTP.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |