gemmellr commented on a change in pull request #3851:
URL: https://github.com/apache/activemq-artemis/pull/3851#discussion_r753314620
##########
File path:
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
##########
@@ -188,6 +208,16 @@ public String encode(String secret) throws Exception {
BigInteger n = new BigInteger(encoding);
return n.toString(16);
}
+
+ @Override
+ public boolean verify(char[] inputValue, String storedValue) {
+ try {
+ return Objects.equals(storedValue,
encode(String.valueOf(inputValue)));
Review comment:
I dont think they were, or if so then that ability has since gone away.
They are only ever provided with String args in the code base, which only ever
uses SensitiveDataCodec with T set as String, via SensitiveDataCodec\<String\>.
If the return type of encode/decode is T/String is seems entirely reasonable
the input for the compare would also be T/String. The codebase impls certainly
dont work with anything else, and noone else is implementing this method yet.
Its also unclear where someone would get a non-T/String type object from to
give it, when thats all the other methods give out and all the broker uses.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]