digest: update NewDigestFromHex signature to use Algorithm#29
Conversation
For consistency reasons, make NewDigestFromHex also take an Algorithm as the alg argument. Signed-off-by: Aleksa Sarai <asarai@suse.de>
|
Is this backwards compatible? Seems like this would break existing code that uses this function. Looking at the uses of this function across docker, using the algorithm type here makes a lot of sense. It might actually make sense to hang a method off the algorithm to hit this use case and deprecate |
|
So |
|
@cyphar Do you want to submit a PR for |
|
Currently |
I'm not sure this is a huge concern. These are all just constructor methods. The fact that these are have similar structure is just a coincidence. |
|
I think it is a valid concern that today
While this could still have the same naming ambiguity, |
Yes, but this will break existing code. I like to be able to run |
|
#33 covers this by adding |
|
👍 Sure, works for me. |
For consistency reasons, make NewDigestFromHex also take an Algorithm as
the alg argument.
Signed-off-by: Aleksa Sarai asarai@suse.de