@JvmStatic fun toSupportedPrivateKey(key: PrivateKey): PrivateKey
Convert a private key to a supported implementation. This can be used to convert a SUN's EC key to an BC key. This method is usually required to retrieve keys from JKS keystores that by default return SUN implementations.
IllegalArgumentException
- on not supported scheme or if the given key specification
is inappropriate for a supported key factory to produce a private key.
Return
a supported implementation of the input private key.