Key pair generator->; key pair-& gt; RSAPublicKey、RSAPrivateKey
2. Party A encrypts the encrypted data with the private key, and then signs the encrypted data with the private key and sends it to Party B.
RSA coder . encryptbyprivatekey(data,privateKey);
RSACoder.sign(encodedData,private key);
3. Party B verifies the signed encrypted data through the public key, and decrypts the encrypted data through the public key if the verification is correct.
RSACoder.verify(encodedData,publicKey,sign);
RSA coder . decryptbypublickey(encoded data,public key);
4. Party B sends it to Party A through public key encryption.
RSA coder . encryptbypublickey(decode ddata,public key);
5. Party A decrypts the data through the private key.
RSA coder . decryptprivatekey(encoded data,private key);