Skip to content

Commit 90b218d

Browse files
committed
[FAB-14941] remove GenerateHashFromSignature
Change-Id: I48da40f2f4a1d25bb722be6fc20df4a9a3c25e9f Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
1 parent 3a88af0 commit 90b218d

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

common/util/utils.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ func CreateUtcTimestamp() *timestamp.Timestamp {
8989
return &(timestamp.Timestamp{Seconds: secs, Nanos: nanos})
9090
}
9191

92-
//GenerateHashFromSignature returns a hash of the combined parameters
93-
func GenerateHashFromSignature(path string, args []byte) []byte {
94-
return ComputeSHA256(args)
95-
}
96-
9792
// GenerateIDfromTxSHAHash generates SHA256 hash using Tx payload
9893
func GenerateIDfromTxSHAHash(payload []byte) string {
9994
return fmt.Sprintf("%x", ComputeSHA256(payload))

common/util/utils_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,6 @@ func TestTimestamp(t *testing.T) {
6363
}
6464
}
6565

66-
func TestGenerateHashFromSignature(t *testing.T) {
67-
if bytes.Compare(GenerateHashFromSignature("aPath", []byte("aCtor12")),
68-
GenerateHashFromSignature("aPath", []byte("aCtor12"))) != 0 {
69-
t.Fatalf("Expected hashes to match, but they did not match")
70-
}
71-
if bytes.Compare(GenerateHashFromSignature("aPath", []byte("aCtor12")),
72-
GenerateHashFromSignature("bPath", []byte("bCtor34"))) == 0 {
73-
t.Fatalf("Expected hashes to be different, but they match")
74-
}
75-
}
76-
7766
func TestGeneratIDfromTxSHAHash(t *testing.T) {
7867
txid := GenerateIDfromTxSHAHash([]byte("foobar"))
7968
txid2 := GenerateIDfromTxSHAHash([]byte("foobar1"))

0 commit comments

Comments
 (0)