Decryption Error bad padding
问题 I am trying to send encrypted messages between two agents .I have a string that contains information that I convert to bytes encrypt it and then to string again to send the message. Messages are received however, at the receiving agent I get the following exception javax.crypto.BadPaddingException: Decryption error at sun.security.rsa.RSAPadding.unpadV15(Unknown Source) at sun.security.rsa.RSAPadding.unpad(Unknown Source) at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:354) at com