We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Simple C code for this. Definitely able to work with the strings here since the constraints for the problem are well defined.
A bit of a "hack" here - "message[i] - '0'" forces message[i] to be interpreted as an integer constant as opposed to a character. Modulo 10 is used to prevent roll over from, say, 9 -> 11 when e = 2.
Security Key Spaces
You are viewing a single comment's thread. Return to all comments →
Simple C code for this. Definitely able to work with the strings here since the constraints for the problem are well defined.
A bit of a "hack" here - "message[i] - '0'" forces message[i] to be interpreted as an integer constant as opposed to a character. Modulo 10 is used to prevent roll over from, say, 9 -> 11 when e = 2.