> Whoops, done it again. The old method is in the SPI class.
>
> I'm assuming that the idea is to use genKeyPair as the old
> generateKeyPair method is not final...
Note that you can use both methods.
KeyPairGenerator is one of those classes where the
API/SPI separation is not "clean" (i.e., the API extends
off of the SPI class instead of being a completely separate
class) due to backwards-compatibility reasons.
Another problem in this particular class was that there
only existed a single "generateKeyPair" method, which
was API and SPI at the same time. There *should* have
been a "generateKeyPair" and a corresponding
"engineGenerateKeyPair" method. This was the situation
in JDK 1.1.x, which we could not change in JDK 1.2
(again, due to backwards-compatibility reason).
Therefore, we added a "genKeyPair" method in the API class,
which invokes the "generateKeyPair" in the SPI class.
Since the API class extends off of the SPI class, you
could also call "generateKeyPair" directly (as you used
to).
Hope this makes sense.
Jan