-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
What happened?
https://github.com/search?q=repo%3Ahyperledger%2Ffirefly+sha256.New%28%29.Sum&type=code
sha256.New().Sum
!= sha256.Sum256
. See https://go.dev/play/p/vSW0U3Hq4qk
I tried to make a PR but couldn't work out some test failures. Additionally, I don't have enough context to know whether this is a breaking change, so I'm just gonna file this issue instead.
What did you expect to happen?
I expected vars like "unique hash" to have unique hashes in them. Instead, they have the raw plaintext with SHA256("") appended to the end.
How can we reproduce it (as minimally and precisely as possible)?
Ya just gotta switch from sha256.New().Sum
to sha256.Sum256
. Note that you may need to throw that in a variable and then convert the byte array to byte slice with [:]
.
See kubernetes-sigs/bom#524 for a similar PR.
Anything else we need to know?
No response
OS version
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working