Methods Summary |
---|
public static org.bouncycastle.asn1.cms.KeyAgreeRecipientInfo | getInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)return a KeyAgreeRecipientInfo object from a tagged object.
return getInstance(ASN1Sequence.getInstance(obj, explicit));
|
public static org.bouncycastle.asn1.cms.KeyAgreeRecipientInfo | getInstance(java.lang.Object obj)return a KeyAgreeRecipientInfo object from the given object.
if (obj == null || obj instanceof KeyAgreeRecipientInfo)
{
return (KeyAgreeRecipientInfo)obj;
}
if (obj instanceof ASN1Sequence)
{
return new KeyAgreeRecipientInfo((ASN1Sequence)obj);
}
throw new IllegalArgumentException(
"Illegal object in KeyAgreeRecipientInfo: " + obj.getClass().getName());
|
public org.bouncycastle.asn1.x509.AlgorithmIdentifier | getKeyEncryptionAlgorithm()
return keyEncryptionAlgorithm;
|
public OriginatorIdentifierOrKey | getOriginator()
return originator;
|
public org.bouncycastle.asn1.ASN1Sequence | getRecipientEncryptedKeys()
return recipientEncryptedKeys;
|
public org.bouncycastle.asn1.ASN1OctetString | getUserKeyingMaterial()
return ukm;
|
public org.bouncycastle.asn1.DERInteger | getVersion()
return version;
|
public org.bouncycastle.asn1.DERObject | toASN1Object()Produce an object suitable for an ASN1OutputStream.
KeyAgreeRecipientInfo ::= SEQUENCE {
version CMSVersion, -- always set to 3
originator [0] EXPLICIT OriginatorIdentifierOrKey,
ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
recipientEncryptedKeys RecipientEncryptedKeys
}
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(version);
v.add(new DERTaggedObject(true, 0, originator));
if (ukm != null)
{
v.add(new DERTaggedObject(true, 1, ukm));
}
v.add(keyEncryptionAlgorithm);
v.add(recipientEncryptedKeys);
return new DERSequence(v);
|