Fixed bug in AbstractKeyPairGenerator