META-INF.versions.11.org.bouncycastle.jcajce.provider.asymmetric.edec.BC11XDHPublicKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-lts8on Show documentation
Show all versions of bcprov-lts8on Show documentation
The Long Term Stable (LTS) Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains the JCA/JCE provider and low-level API for the BC LTS version 2.73.6 for Java 8 and later.
The newest version!
package org.bouncycastle.jcajce.provider.asymmetric.edec;
import java.security.interfaces.XECPublicKey;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.NamedParameterSpec;
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
import org.bouncycastle.crypto.params.AsymmetricKeyParameter;
import org.bouncycastle.crypto.params.X448PublicKeyParameters;
class BC11XDHPublicKey
extends BCXDHPublicKey
implements XECPublicKey
{
BC11XDHPublicKey(AsymmetricKeyParameter pubKey)
{
super(pubKey);
}
BC11XDHPublicKey(SubjectPublicKeyInfo keyInfo)
{
super(keyInfo);
}
BC11XDHPublicKey(byte[] prefix, byte[] rawData)
throws InvalidKeySpecException
{
super(prefix, rawData);
}
public AlgorithmParameterSpec getParams()
{
if (xdhPublicKey instanceof X448PublicKeyParameters)
{
return NamedParameterSpec.X448;
}
else
{
return NamedParameterSpec.X25519;
}
}
}