code: public String encryptWithBase64(byte[] data) throws NoSuchAlgorithmException, NoSuchProviderException,
              NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException,
              InvalidAlgorithmParameterException, InvalidCipherTextException, IOException {
          byte[] cipher = encryptBytes(data);
          return Base64.toBase64String(cipher);
      }
docs: Encrypt data with TLS certificate and convert cipher to base64
  
  @param data
  byte array to encrypt
  @return cipher in base64
  @throws NoSuchAlgorithmException
  NoSuchAlgorithmException
  @throws NoSuchProviderException
  NoSuchProviderException
  @throws NoSuchPaddingException
  NoSuchPaddingException
  @throws InvalidKeyException
  InvalidKeyException
  @throws IllegalBlockSizeException
  IllegalBlockSizeException
  @throws BadPaddingException
  BadPaddingException
  @throws InvalidAlgorithmParameterException
  InvalidAlgorithmParameterException
  @throws IOException
  IOException
  @throws InvalidCipherTextException
  InvalidCipherTextException