Hashing API

Here is the Hashing API I have written as part of my GSoC project. Also added a  check of policy files for JCE in JCELoader. 
Some places have this separate boolean to assert on and others put the entire condition in the assert statement. It seems preferable to use one consistently. Which one?