diff options
Diffstat (limited to 'object/id/algorithm_details.go')
| -rw-r--r-- | object/id/algorithm_details.go | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/object/id/algorithm_details.go b/object/id/algorithm_details.go index 23737ab5..883853c7 100644 --- a/object/id/algorithm_details.go +++ b/object/id/algorithm_details.go @@ -9,11 +9,8 @@ import ( type algorithmDetails struct { name string size int - packHashID uint32 - signatureHeaderName string sum func([]byte) ObjectID new func() hash.Hash - emptyTree ObjectID } func (algo Algorithm) details() algorithmDetails { @@ -26,8 +23,6 @@ var algorithmTable = [...]algorithmDetails{ AlgorithmSHA1: { name: "sha1", size: sha1.Size, - packHashID: 1, - signatureHeaderName: "gpgsig", sum: func(data []byte) ObjectID { sum := sha1.Sum(data) //#nosec G401 @@ -38,13 +33,10 @@ var algorithmTable = [...]algorithmDetails{ return id }, new: sha1.New, - emptyTree: ObjectID{}, //nolint:exhaustruct }, AlgorithmSHA256: { name: "sha256", size: sha256.Size, - packHashID: 2, - signatureHeaderName: "gpgsig-sha256", sum: func(data []byte) ObjectID { sum := sha256.Sum256(data) @@ -55,7 +47,6 @@ var algorithmTable = [...]algorithmDetails{ return id }, new: sha256.New, - emptyTree: ObjectID{}, //nolint:exhaustruct }, } @@ -75,14 +66,7 @@ func init() { //nolint:gochecknoinits // Skip over AlgorithmUnknown. for algo := Algorithm(1); int(algo) < len(algorithmTable); algo++ { info := &algorithmTable[algo] - - info.emptyTree = info.sum([]byte("tree 0\x00")) - algorithmByName[info.name] = algo - if info.signatureHeaderName != "" { - algorithmBySignatureHeaderName[info.signatureHeaderName] = algo - } - supportedAlgorithms = append(supportedAlgorithms, algo) } } |
