code: public static byte[] encrypt(RSAPublicKey key, byte[] data)
              throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException,
              IllegalBlockSizeException, BadPaddingException, IOException {
          return encrypt(key, data, DEFAULT_CIPHER_TRANSFORMATION, DEFAULT_PADDING_SIZE);
      }
docs: Encrypt data with RSA public key, using {@link #DEFAULT_CIPHER_TRANSFORMATION}.
  
  <p>
  Note: input data is divided into chunks of
  {@code size = key's size (in bytes) - paddingSizeInBytes}, so that long input data can be
  encrypted.
  </p>
  
  @param key
  @param data
  @return
  @throws IOException
  @throws BadPaddingException
  @throws IllegalBlockSizeException
  @throws NoSuchPaddingException
  @throws NoSuchAlgorithmException
  @throws InvalidKeyException