The sha512 function provides an easy way to calculate the SHA512 hash of a given value.
Template function properties | |
---|---|
Function | Calculate the SHA512 hash of a given value |
Function name | sha512 |
Returns | The SHA512 hash |
Return type | string |
Can be used as a filter | Yes |
Can be used as a test | No |
Spook's influence | Newly added template function |
Developer tools | Try this in the template developer tools |
Signature |
---|
|
Function parameters | |||
---|---|---|---|
Attribute | Type | Required | Default / Example |
value | string | Yes | hash me |
ExamplesΒΆ
Using sha512 as a functionΒΆ
1
{{ sha512("hash me") }}
Returns:
a4e696753b7051ad155897857e3c953ea1aec14701a93a23fc3a8d89c874e21edec7d0f7360ce03cb5c82df2b4a8a7ff40c6a475a52a59ee13912d217e72cb91
Using sha512 as a filterΒΆ
1
{{ "hash me" | sha512 }}
Returns:
a4e696753b7051ad155897857e3c953ea1aec14701a93a23fc3a8d89c874e21edec7d0f7360ce03cb5c82df2b4a8a7ff40c6a475a52a59ee13912d217e72cb91
Features requests, ideas, and supportΒΆ
If you have an idea on how to further enhance the Home Assistant template engine, for example, by adding a new template function; feel free to let us know in our discussion forums.
Are you stuck using this new feature? Or maybe youβve run into a bug? Please check the Support page on where to go for help.