public static byte[] decode(byte[] data,String pri_key){
  try {
    Cipher cipher=Cipher.getInstance("RSA/ECB/PKCS1Padding");
    java.security.Key k=getPrivateKey(pri_key);
    cipher.init(Cipher.DECRYPT_MODE,k);
    byte[] deBytes=cipher.doFinal(data);
    return deBytes;
  }
 catch (  Exception e) {
    log.error(pri_key,e);
  }
  return null;
}

public static byte [ ] decode ( byte [ ] data , String pri_key ) { try { Cipher cipher = Cipher . getInstance ( "RSA/ECB/PKCS1Padding" ) ; java . security . Key k = getPrivateKey ( pri_key ) ; cipher . init ( Cipher . DECRYPT_MODE , k ) ; byte [ ] deBytes = cipher . doFinal ( data ) ; return deBytes ; } catch ( Exception e ) { log . error ( pri_key , e ) ; } return null ; }
decode data with private key .
