RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v10]

Sean Mullan mullan at openjdk.org
Mon Aug 5 18:02:36 UTC 2024


On Thu, 1 Aug 2024 21:05:08 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> I was trying to convey that deriveKey|Data are not like doFinal in that they can be called more than once on a single instance. Is there a different way to word this? Or is it not important to mention here?
>
> Not sure. Maybe your sentence is OK.

I agree that this might lead to some question as to whether a `derive` method can be called concurrently. I think we should just remove this sentence. I think one should assume a method can be called more than once without saying that. If there was some reason this method could not be called more than once, then it should throw `IllegalStateException` or some such similar exception.

If you still feel like you want to emphasize the method can be called more than once, I would add it to the example in the class description.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1704462842



More information about the security-dev mailing list