Add tools for generation of crypto algorithm support documentation.

The tool suite consists of:

* crypto_support.json, a JSON file that stores the name and API levels
  of all the algorithms we provide or have provided in the past.
* ListProviders.java, which runs on a device and outputs a list of
  all the algorithms provided by the security providers.
* update_crypto_support.py, which consumes the output of ListProviders
  and rewrites the JSON file to reflect the currently-supported
  algorithms.
* run_update_crypto_support.sh, which ties the previous two together
  to make it more convenient to run.
* format_supported_algorithm_table.py, which reads the JSON file and
  generates a set of HTML tables that can be copied-and-pasted into
  documentation.

The intermediate JSON file makes it a lot easier to verify that the
tools have done the right thing after an update, instead of having
to compare the HTML output.

Only Mac and MessageDigest are included for now.  I'll add additional
categories of algorithms in a future change, but I wanted to send the
code out for review before spending the time to add the data on
formerly-provided algorithms that's in the class documentation.

Bug: 35793879
Test: libcore/tools/update_crypto_support_test.py
Change-Id: Ib14722b2703cbbc45438d1168395e4e1194515a2
6 files changed