title: Turn URL parameter into SHA1 either in twig or in route or any other place
body: <p>How can I generate URL below in Twig? I would accept any other solution, not only twig, as long as the hashId is turned into SHA1 format.</p>
  
  <p><strong>Note:</strong> <code>brand.id</code> is coming from DB as in plain numbers like <code>1, 2, ,3, 10, 23, 69, .....</code> and needs to be hashed. I don't want to store hashed data in DB!</p>
  
  <p><strong>Generating the URLs like this:</strong></p>
  
  <pre><code>{% for brand in brands %}
     &lt;a href="{{ path('product_delete_process', {'hashId':brand.id }) }}"&gt;Delete&lt;/a&gt;
     &lt;br /&gt;
  {% endfor %}
  </code></pre>
  
  <p><strong>OUTCOME URL:</strong></p>
  
  <pre><code>...../product/delete/process/12df54dg54th897yhjrt65DFesrSDE1123ASa
  </code></pre>
  
  <p><strong>ROUTE:</strong></p>
  
  <pre><code>product_delete_process:
      pattern:  /product/delete/process/{hashId}
      defaults: { _controller: ProDuctBundle:ProductDelete:process }
      methods:  [GET]
      requirements:
          hashId:   "[a-zA-Z0-9]{40}"
  </code></pre>