A fast policy classification method and system. A policy differentiator can be
provided which can include a policy repository configured to store hierarchical
policy classification trees. The policy differentiator further can include a hashing
module configured to produce integer values for string based selector attributes.
In one aspect of the invention, the hashing module can include a longest string
hashing function. A policy matching engine can be provided which is configured
to locate policy rules in the hierarchical policy classification trees according
to the integer values produced for the string based selector attributes. Finally,
a policy matching engine interface can be provided through which policy queries
and resulting policy decisions of the policy matching engine can be communicated
between the policy matching engine and the policy enforcement entity.