diff options
Diffstat (limited to 'object/id/algorithm_parse.go')
| -rw-r--r-- | object/id/algorithm_parse.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/object/id/algorithm_parse.go b/object/id/algorithm_parse.go index 7349288f..63db32dc 100644 --- a/object/id/algorithm_parse.go +++ b/object/id/algorithm_parse.go @@ -6,3 +6,11 @@ func ParseAlgorithm(s string) (Algorithm, bool) { return algo, ok } + +// ParseSignatureHeaderName parses one canonical signature header name +// such as "gpgsig" or "gpgsig-sha256" to its respective algorithm. +func ParseSignatureHeaderName(s string) (Algorithm, bool) { + algo, ok := algorithmBySignatureHeaderName[s] + + return algo, ok +} |
