tpl: Add sha256 template function

Fixes #2742
This commit is contained in:
digitalcraftsman
2016-12-04 13:35:31 +01:00
committed by Bjørn Erik Pedersen
parent 01b8bc1b26
commit 0f6c73cf2e
3 changed files with 50 additions and 0 deletions

View File

@@ -768,6 +768,17 @@ This can be useful if you want to use Gravatar for generating a unique avatar:
<!-- returns the string "c8b5b0e33d408246e30f53e32b8f7627a7a649d4" -->
```
### sha256
`sha256` hashes the given input and returns its SHA256 checksum.
```html
{{ sha256 "Hello world, gophers!" }}
<!-- returns the string "6ec43b78da9669f50e4e422575c54bf87536954ccd58280219c393f2ce352b46" -->
```
## Internationalization
### i18n