Package org.cryptacular.adapter
Class Converter
java.lang.Object
org.cryptacular.adapter.Converter
Static factory with methods to convert from BC type to the corresponding JCE type.
- Author:
- Middleware Services
-
Method Summary
Modifier and TypeMethodDescriptionstatic PrivateKeyconvertPrivateKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter bcKey) Produces aPrivateKeyfrom a BC private key type.static PublicKeyconvertPublicKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter bcKey) Produces aPublicKeyfrom a BC public key type.
-
Method Details
-
convertPrivateKey
public static PrivateKey convertPrivateKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter bcKey) Produces aPrivateKeyfrom a BC private key type.- Parameters:
bcKey- BC private key.- Returns:
- JCE private key.
-
convertPublicKey
public static PublicKey convertPublicKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter bcKey) Produces aPublicKeyfrom a BC public key type.- Parameters:
bcKey- BC public key.- Returns:
- JCE public key.
-