![JAR search and dependency download from the Maven repository](/logo.png)
org.bouncycastle.cms.KEMRecipientId Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcpkix-debug-jdk15to18 Show documentation
Show all versions of bcpkix-debug-jdk15to18 Show documentation
The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and certificate generation. This jar contains APIs for JDK 1.5 to JDK 1.8. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs.
The newest version!
package org.bouncycastle.cms;
import java.math.BigInteger;
import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.cert.selector.X509CertificateHolderSelector;
public class KEMRecipientId
extends PKIXRecipientId
{
private KEMRecipientId(X509CertificateHolderSelector baseSelector)
{
super(kem, baseSelector);
}
/**
* Construct a key trans recipient ID with the value of a public key's subjectKeyId.
*
* @param subjectKeyId a subjectKeyId
*/
public KEMRecipientId(byte[] subjectKeyId)
{
super(kem, null, null, subjectKeyId);
}
/**
* Construct a key trans recipient ID based on the issuer and serial number of the recipient's associated
* certificate.
*
* @param issuer the issuer of the recipient's associated certificate.
* @param serialNumber the serial number of the recipient's associated certificate.
*/
public KEMRecipientId(X500Name issuer, BigInteger serialNumber)
{
super(kem, issuer, serialNumber, null);
}
/**
* Construct a key trans recipient ID based on the issuer and serial number of the recipient's associated
* certificate.
*
* @param issuer the issuer of the recipient's associated certificate.
* @param serialNumber the serial number of the recipient's associated certificate.
* @param subjectKeyId the subject key identifier to use to match the recipients associated certificate.
*/
public KEMRecipientId(X500Name issuer, BigInteger serialNumber, byte[] subjectKeyId)
{
super(kem, issuer, serialNumber, subjectKeyId);
}
public Object clone()
{
return new KEMRecipientId(this.baseSelector);
}
public boolean match(Object obj)
{
if (obj instanceof KEMRecipientInformation)
{
return ((KEMRecipientInformation)obj).getRID().equals(this);
}
return super.match(obj);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy