Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Add BLAKE-3 to templates.go (gopasspw#2701)
Browse files Browse the repository at this point in the history
  • Loading branch information
yonas authored Nov 19, 2023
1 parent 2af805a commit d77be31
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/commands/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ Function | Example | Description
`argon2i` | `{{ getpw "foo/bar" \| argon2i }}` | Calculate the Argon2i hash of the input.
`argon2id` | `{{ getpw "foo/bar" \| argon2id }}` | Calculate the Argon2id hash of the input.
`bcrypt` | `{{ getpw "foo/bar" \| bcrypt }}` | Calculate the Bcrypt hash of the input.
`blake3` | `{{ getpw "foo/bar" \| blake3 }}` | Calculate the BLAKE-3 hash of the input.
1 change: 1 addition & 0 deletions docs/commands/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Function | Example | Description
`argon2i` | `{{ .Content \| argon2i }}` | Calculate the Argon2i hash of the input.
`argon2id` | `{{ .Content \| argon2id }}` | Calculate the Argon2id hash of the input.
`bcrypt` | `{{ .Content \| bcrypt }}` | Calculate the Bcrypt hash of the input.
`blake3` | `{{ .Content \| blake3 }}` | Calculate the BLAKE-3 hash of the input.

## Template variables

Expand Down
1 change: 1 addition & 0 deletions internal/action/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
# Available Template functions:
# - md5sum: e.g. {{ .Content | md5sum }}
# - sha1sum: e.g. {{ .Content | sha1sum }}
# - blake3 e.g. {{ .Content | blake3 }}
# - md5crypt: e.g. {{ .Content | md5crypt }}
# - ssha: e.g. {{ .Content | ssha }}
# - ssha256: e.g. {{ .Content | ssha256 }}
Expand Down
2 changes: 1 addition & 1 deletion internal/tpl/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func Example() { //nolint:testableexamples
Password-value of the new entry: {{ .Content }}
Md5sum of the new password: {{ .Content | md5sum }}
Sha1sum of the new password: {{ .Content | sha1sum }}
Blake3sum of the new password: {{ .Content | blake3sum }}
Blake3 of the new password: {{ .Content | blake3 }}
Md5crypt of the new password: {{ .Content | md5crypt }}
SSHA of the new password: {{ .Content | ssha }}
SSHA256 of the new password: {{ .Content | ssha256 }}
Expand Down

0 comments on commit d77be31

Please sign in to comment.