title: How to take a user input (from scanner) and convert the entire input into ascii
body: <p>I'm doing a small java RSA Encryption task and i've found myself stuck.</p>
  
  <p>I'm currently using a stringbuilder that takes in a users input and converts it all into ascii however it just gives the exact character (a = 97) for the ascii to be encrypted into something readable it needs to output all characters like this (a = 097).</p>
  
  <p>Any idea how to fix this or is there a better solution for this?</p>
  
  <pre><code> String Secret;
  
   Scanner input = new Scanner(System.in); //opens a scanner, keyboard
   System.out.println("Please Enter what you want to encrypt: "); //prompt the user
   Secret = input.next(); //store the input from the user
  
   String str = Secret;  // or anything else
  
   StringBuilder sb = new StringBuilder();// do 1 character at a time. / convert each to ascii one at a time and then, have each2 values equate to 11 digit or "value"
   for (char c : str.toCharArray( ))
   sb.append((byte)c);// bit array could be easier as this could make it difficult to decrypt
  
       BigInteger m = new BigInteger(sb.toString());
  
   System.out.println(m);
  </code></pre>