refactored some GMAP and GHASH-TABLE functions after API change.