diff options
| author | 2026-04-02 07:39:49 +0000 | |
|---|---|---|
| committer | 2026-04-02 07:39:49 +0000 | |
| commit | b5251cf0b42a7ff13c39b327222175d581b62a83 (patch) | |
| tree | 3ac391eebfd58c95c63863678888886375ea1dfd /object/id/algorithm_parse.go | |
| parent | object/id: Add algorithm stuff (diff) | |
| signature | No signature | |
object/id: Add more object ID stuff
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 +} |
