protected void encryptPolicies(String orgId, String entityId, String entityVersion, EntityType entityType,
            List<Policy> policies) {
        if (policies != null) {
            DataEncryptionContext ctx = new DataEncryptionContext(orgId, entityId, entityVersion, entityType);
            for (Policy policy : policies) {
                String jsonConfig = policy.getPolicyJsonConfig();
                policy.setPolicyJsonConfig(encrypter.encrypt(jsonConfig, ctx));
            }
        }
    }
@param entityType
@param entityVersion
@param entityId
@param orgId
@param entityType
@param policies
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/SecureRegistryWrapper.java