Package org.bouncycastle.asn1.cms
Class PasswordRecipientInfo
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.cms.PasswordRecipientInfo
- All Implemented Interfaces:
ASN1Encodable,Encodable
RFC 5652:
Content encryption key delivery mechanisms.
PasswordRecipientInfo ::= SEQUENCE {
version CMSVersion, -- Always set to 0
keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier
OPTIONAL,
keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
encryptedKey EncryptedKey }
-
Constructor Summary
ConstructorsConstructorDescriptionPasswordRecipientInfo(AlgorithmIdentifier keyEncryptionAlgorithm, ASN1OctetString encryptedKey) PasswordRecipientInfo(AlgorithmIdentifier keyDerivationAlgorithm, AlgorithmIdentifier keyEncryptionAlgorithm, ASN1OctetString encryptedKey) -
Method Summary
Modifier and TypeMethodDescriptionstatic PasswordRecipientInfogetInstance(Object obj) Return a PasswordRecipientInfo object from the given object.static PasswordRecipientInfogetInstance(ASN1TaggedObject obj, boolean explicit) Return a PasswordRecipientInfo object from a tagged object.Produce an object suitable for an ASN1OutputStream.Methods inherited from class org.bouncycastle.asn1.ASN1Object
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
PasswordRecipientInfo
public PasswordRecipientInfo(AlgorithmIdentifier keyEncryptionAlgorithm, ASN1OctetString encryptedKey) -
PasswordRecipientInfo
public PasswordRecipientInfo(AlgorithmIdentifier keyDerivationAlgorithm, AlgorithmIdentifier keyEncryptionAlgorithm, ASN1OctetString encryptedKey)
-
-
Method Details
-
getInstance
Return a PasswordRecipientInfo object from a tagged object.- Parameters:
obj- the tagged object holding the object we want.explicit- true if the object is meant to be explicitly tagged false otherwise.- Throws:
IllegalArgumentException- if the object held by the tagged object cannot be converted.
-
getInstance
Return a PasswordRecipientInfo object from the given object.Accepted inputs:
- null → null
-
PasswordRecipientInfoobject -
ASN1Sequenceinput formats with PasswordRecipientInfo structure inside
- Parameters:
obj- the object we want converted.- Throws:
IllegalArgumentException- if the object cannot be converted.
-
getVersion
-
getKeyDerivationAlgorithm
-
getKeyEncryptionAlgorithm
-
getEncryptedKey
-
toASN1Primitive
Produce an object suitable for an ASN1OutputStream.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-