protected byte[] encrypt(CipherParameters publicKey, Element... ids) {
    byte[] ciphertext = new byte[0];
    try {
      PredicateOnlyEncryptionScheme engine = new UHIBELW11PredicateOnlyEngine();
      engine.init(
          true, new UHIBELW11EncryptionParameters((UHIBELW11PublicKeyParameters) publicKey, ids));
      ciphertext = engine.process();

      assertNotNull(ciphertext);
      assertNotSame(0, ciphertext.length);
    } catch (InvalidCipherTextException e) {
      e.printStackTrace();
      fail(e.getMessage());
    }

    return ciphertext;
  }