RFR: 8343622: AesDkCrypto.stringToKey should not return null [v2]

Sean Mullan mullan at openjdk.org
Fri Nov 8 17:04:53 UTC 2024


On Fri, 8 Nov 2024 14:16:43 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> > There is already a check for a `null` return value in one of the `EncryptedKey` constructors - did you consider instead adding a similar check in the other ctor?
> 
> This hides the real reason why the key value cannot be generated, leaving no information for debugging.

Sure, that's a good reason. What Is the exception and the message? Wondering if it might make sense to rethrow a more meaningful exception with it as the cause.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21908#issuecomment-2465286701


More information about the security-dev mailing list