title: Length of the decryption(RSA) string is changing
body: <p>I have a String which is encrypted with RSA algorithm, When i was trying to decrypt it's working fine.The decryption output will be in byte[].</p>
  
  <p>My question is when i trying to convert the byte[] to  a new String(decrypted String) it's getting different length .</p>
  
  <p>If i try with a random string the length is remains  same.But if i decrypt the 
  generated aesKey(AES) the length of the byte[] is changing while conversion of new String(decrypted String).</p>
  
  <p>Why i am getting different length incase of aesKey decryption???
  Is there any difference between "random string" and "generated aeskey"</p>
  
  <p>String ==
  "t8xypyI6gKlKTkt4Qec7FCor4EpukZXqYQcIDm6YvbtRB9+YBrX0CqyoHOHN91T8RBQS/JD2osbf4ao9Y"SgNbzhfDa2NpJKMEIBWH4TNlF4Ngb8yWdSm3hz3l8FdeFUIy3pyCxkLjU8n4VAxsmgoIQbgd7DJuPiSMZBA9/IVlcCfo/tZjMtSkezITtoT5aVvLxLaTsp08UREdalvXxb5USKi3cAEdqR9TmLJxB004IMv5Eiuvdmcc3fJzO6mnwiHPuGKArd9LjjiqbPQ75uc8NDOFrvleLc5KwSuThS5Xx7tR1qfoX6qefh6SD7FRk5UzyCEnv+eD+mCQ588Jam1A==";</p>
  
  <p>****The above string is encrypted form of the aesKey(generated by KeyGenerator)</p>
  
  <p>If i decrypt this string by using RSA----</p>
  
  <pre><code>private String decrypt(String text, Key privatekey) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
      byte[] dectyptedText = null;
  
      Cipher cipher = Cipher.getInstance("RSA/ECB/OAEPPadding");
      cipher.init(Cipher.DECRYPT_MODE, privatekey);
      dectyptedText = cipher.doFinal(Base64.getDecoder().decode(text));
      System.out.println(dectyptedText.length);                  //32
      System.out.println(new String(dectyptedText).length());    //30
      System.out.println(new String(dectyptedText).getBytes().length); //60
      return new String(dectyptedText);
  
  }
  </code></pre>
  
  <p>above, The length is  changing in byte string conversions.</p>
  
  <p>Suppose if i encrypt and decrypt with a normal string the lengths are not changing????why????</p>