Class SignedData
- 
                    
                    
- All Implemented Interfaces:
 - 
                            
                            
io.anyline.nfc.bouncycastle.asn1.ASN1Encodable,io.anyline.nfc.bouncycastle.util.Encodable 
public class SignedData extends ASN1Object
A signed data object containing multitude of SignerInfos.
SignedData ::= SEQUENCE { version CMSVersion, digestAlgorithms DigestAlgorithmIdentifiers, encapContentInfo EncapsulatedContentInfo, certificates [0] IMPLICIT CertificateSet OPTIONAL, crls [1] IMPLICIT CertificateRevocationLists OPTIONAL, signerInfos SignerInfos } DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier SignerInfos ::= SET OF SignerInfoThe version calculation uses following ruleset from RFC 5652 section 5.1:
IF ((certificates is present) AND (any certificates with a type of other are present)) OR ((crls is present) AND (any crls with a type of other are present)) THEN version MUST be 5 ELSE IF (certificates is present) AND (any version 2 attribute certificates are present) THEN version MUST be 4 ELSE IF ((certificates is present) AND (any version 1 attribute certificates are present)) OR (any SignerInfo structures are version 3) OR (encapContentInfo eContentType is other than id-data) THEN version MUST be 3 ELSE version MUST be 1 
- 
                
                    
                    
- 
                                
                            
                                
Field Summary
Fields Modifier and Type Field Description public ASN1Integerversionpublic ASN1SetdigestAlgorithmspublic ASN1Setcertificatespublic ASN1SetsignerInfos 
- 
                                
                            
                                
Constructor Summary
Constructors Constructor Description SignedData(ASN1Set digestAlgorithms, ContentInfo contentInfo, ASN1Set certificates, ASN1Set crls, ASN1Set signerInfos) 
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description ASN1IntegergetVersion()ASN1SetgetDigestAlgorithms()ASN1SetgetCertificates()ASN1SetgetSignerInfos()static SignedDatagetInstance(Object o)Return a SignedData object from the given object. ContentInfogetEncapContentInfo()ASN1SetgetCRLs()ASN1PrimitivetoASN1Primitive()Produce an object suitable for an ASN1OutputStream. - 
                    
                    
                    
- 
                                
                            
                                
Constructor Detail
- 
                                        
SignedData
SignedData(ASN1Set digestAlgorithms, ContentInfo contentInfo, ASN1Set certificates, ASN1Set crls, ASN1Set signerInfos)
 
 - 
                                        
 
- 
                                
                            
                                
Method Detail
- 
                                        
getVersion
ASN1Integer getVersion()
 
- 
                                        
getDigestAlgorithms
ASN1Set getDigestAlgorithms()
 
- 
                                        
getCertificates
ASN1Set getCertificates()
 
- 
                                        
getSignerInfos
ASN1Set getSignerInfos()
 
- 
                                        
getInstance
static SignedData getInstance(Object o)
Return a SignedData object from the given object.
Accepted inputs:
- null → null
 - SignedData object
 - ASN1Sequence input formats with SignedData structure inside
 
- Parameters:
 o- the object we want converted.- Returns:
 a reference that can be assigned to SignedData (may be null)
 
- 
                                        
getEncapContentInfo
ContentInfo getEncapContentInfo()
 
- 
                                        
toASN1Primitive
ASN1Primitive toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.
 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -