question: public static byte [ ] encode ( byte [ ] data , String pub_key ) { try { Cipher cipher = Cipher . getInstance ( "RSA/ECB/PKCS1Padding" ) ; java . security . Key k = getPublicKey ( pub_key ) ; cipher . init ( Cipher . ENCRYPT_MODE , k ) ; byte [ ] enBytes = cipher . doFinal ( data ) ; return enBytes ; } catch ( Exception e ) { log . error ( "pubkey=" + pub_key + ", data.length=" + data . length , e ) ; } return null ; }
target:  encode the data with the public key.