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. 
This loop can be replaced with a for-each. Every time the index variable is used it is in `types[i]`.