Craft or Twig filter for MD5 or SHA3 hash creation? I've been digging around and haven't found an existing Twig filter for what I'm trying to do. Basically, I'd like a filter that would provide a hash of a phrase.

Pseudo-template code would be something like this:

{{ "my phrase here"|hashwithmd5 }} 


And would generate this in my rendered template:

6e6d5618f8ab8a302a236eac07c59300


Does something like this exist? Am I going about this in a bad way?
sounds like a simple plugin will do the trick for you. You will need to set up your main plugin class and a variable class. 

Your variable class will look something like this:

&lt;?php
namespace Craft;

class YourPluginNameVariable
{
    public function makeHash($string)
    {
        $hashed = md5($string);
        return $hashed;
    }
}


You can call this in your templates like this:

{{craft.yourpluginname.makeHash('my phrase here')}}


Hope this helps!