FileDocCategorySizeDatePackage
RecipientId.javaAPI DocBouncy Castle Crypto API 1.41 (Java 1.5)1656Wed Oct 01 10:55:30 BST 2008org.bouncycastle.cms

RecipientId

public class RecipientId extends X509CertSelector

Fields Summary
byte[]
keyIdentifier
Constructors Summary
Methods Summary
public booleanequals(java.lang.Object o)

        if (!(o instanceof RecipientId))
        {
            return false;
        }

        RecipientId id = (RecipientId)o;

        return Arrays.areEqual(keyIdentifier, id.keyIdentifier)
            && Arrays.areEqual(this.getSubjectKeyIdentifier(), id.getSubjectKeyIdentifier())
            && equalsObj(this.getSerialNumber(), id.getSerialNumber())
            && equalsObj(this.getIssuerAsString(), id.getIssuerAsString());
    
private booleanequalsObj(java.lang.Object a, java.lang.Object b)

        return (a != null) ? a.equals(b) : b == null;
    
public byte[]getKeyIdentifier()
return the secret key identifier

        return keyIdentifier;
    
public inthashCode()

        int code = Arrays.hashCode(keyIdentifier)
            ^ Arrays.hashCode(this.getSubjectKeyIdentifier());

        BigInteger serialNumber = this.getSerialNumber();
        if (serialNumber != null)
        {
            code ^= serialNumber.hashCode();
        }

        String issuer = this.getIssuerAsString();
        if (issuer != null)
        {
            code ^= issuer.hashCode();
        }

        return code;
    
public voidsetKeyIdentifier(byte[] keyIdentifier)
set a secret key identifier (for use with KEKRecipientInfo)


                  
      
          
    
        this.keyIdentifier = keyIdentifier;