def sha1(str, lenght = 8)
      sha1 = Digest::SHA1.hexdigest(str)
      sha1[0, lenght.to_i]
    end
def sha1(str, lenght = 8)
      sha1 = Digest::SHA1.hexdigest(str)
      sha1[0, lenght.to_i]
    end
Returns the hex-encoded hash value of a given string. The optional
 second argument defines the length of the returned string.

   {{ "Octopod" | sha1 }} => "8b20a59c"
   {{ "Octopod" | sha1:23 }} => "8b20a59c8e2dcb5e1f845ba"