List of usage examples for org.bouncycastle.jce.provider DHUtil generatePublicKeyParameter
static public AsymmetricKeyParameter generatePublicKeyParameter(PublicKey key) throws InvalidKeyException
From source file:org.forgerock.openicf.framework.remote.security.ECIESEncryptor.java
License:Open Source License
public ECIESEncryptor(PrivateKey privateKey, PublicKey publicKey) throws InvalidKeyException { if (publicKey instanceof ECPublicKey) { publicKeyParameter = ECUtil.generatePublicKeyParameter(publicKey); privateKeyParameter = ECUtil.generatePrivateKeyParameter(privateKey); } else {/*from w w w. j a v a2s . c om*/ publicKeyParameter = DHUtil.generatePublicKeyParameter(publicKey); privateKeyParameter = DHUtil.generatePrivateKeyParameter(privateKey); } }