Stoned_Coder is right.
But for knowledge sake, use the stty raw echo command. Get the input and the raw echo will convert it to hex.
Code:
#include <stdio.h>
#include <stdlib.h>
void main(){
char input;
system("stty raw -echo");
printf("This program is designed to convert characters into hex"
" value\n\r");
printf("Press q at any time to quit this program");
while(input != 'q'){
fflush(stdin);
printf("\n\rPlease enter a character:");
scanf("%c", &input);
printf("\n\rChahrater entered: %c", input);
printf("\n\rHexidecimal value: %x", input);
printf("\n\n\rPress q at any time to quit this program");
}
printf("\n\r\n\rThank you\n\r");
system("stty -raw echo");
}
This is just a little C that I put together for you...lol Just to test that conversion works......printf. Object oriented is pretty much the same way.
But this will not make anything secure!!!