Save This Page
Home » openjdk-7 » sun.security » pkcs » [javadoc | source]
sun.security.pkcs
public class: PKCS7 [javadoc | source]
java.lang.Object
   sun.security.pkcs.PKCS7
PKCS7 as defined in RSA Laboratories PKCS7 Technical Note. Profile Supports only SignedData ContentInfo type, where to the type of data signed is plain Data. For signedData, crls, attributes and PKCS#6 Extended Certificates are not supported.
Constructor:
 public PKCS7(InputStream in) throws ParsingException, IOException 
    Unmarshals a PKCS7 block from its encoded form, parsing the encoded bytes from the InputStream.
    Parameters:
    in - an input stream holding at least one PKCS7 block.
    Throws:
    ParsingException - on parsing errors.
    IOException - on other errors.
    exception: ParsingException - on parsing errors.
    exception: IOException - on other errors.
 public PKCS7(DerInputStream derin) throws ParsingException 
    Unmarshals a PKCS7 block from its encoded form, parsing the encoded bytes from the DerInputStream.
    Parameters:
    derin - a DerInputStream holding at least one PKCS7 block.
    Throws:
    ParsingException - on parsing errors.
    exception: ParsingException - on parsing errors.
 public PKCS7(byte[] bytes) throws ParsingException 
    Unmarshals a PKCS7 block from its encoded form, parsing the encoded bytes.
    Parameters:
    bytes - the encoded bytes.
    Throws:
    ParsingException - on parsing errors.
    exception: ParsingException - on parsing errors.
 public PKCS7(AlgorithmId[] digestAlgorithmIds,
    ContentInfo contentInfo,
    X509Certificate[] certificates,
    SignerInfo[] signerInfos) 
 public PKCS7(AlgorithmId[] digestAlgorithmIds,
    ContentInfo contentInfo,
    X509Certificate[] certificates,
    X509CRL[] crls,
    SignerInfo[] signerInfos) 
    Construct an initialized PKCS7 block.
    Parameters:
    digestAlgorithmIds - the message digest algorithm identifiers.
    contentInfo - the content information.
    certificates - an array of X.509 certificates.
    crls - an array of CRLs
    signerInfos - an array of signer information.
Method from sun.security.pkcs.PKCS7 Summary:
encodeSignedData,   encodeSignedData,   getCRLs,   getCertificate,   getCertificates,   getContentInfo,   getDigestAlgorithmIds,   getSignerInfos,   getVersion,   isOldStyle,   toString,   verify,   verify,   verify
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.security.pkcs.PKCS7 Detail:
 public  void encodeSignedData(OutputStream out) throws IOException 
    Encodes the signed data to an output stream.
 public  void encodeSignedData(DerOutputStream out) throws IOException 
    Encodes the signed data to a DerOutputStream.
 public X509CRL[] getCRLs() 
    Returns the X.509 crls listed in this PKCS7 block.
 public X509Certificate getCertificate(BigInteger serial,
    X500Name issuerName) 
    Returns the X.509 certificate listed in this PKCS7 block which has a matching serial number and Issuer name, or null if one is not found.
 public X509Certificate[] getCertificates() 
    Returns the X.509 certificates listed in this PKCS7 block.
 public ContentInfo getContentInfo() 
    Returns the content information specified in this PKCS7 block.
 public AlgorithmId[] getDigestAlgorithmIds() 
    Returns the message digest algorithms specified in this PKCS7 block.
 public SignerInfo[] getSignerInfos() 
    Returns the signer's information specified in this PKCS7 block.
 public BigInteger getVersion() 
    Returns the version number of this PKCS7 block.
 public boolean isOldStyle() 
    Returns true if this is a JDK1.1.x-style PKCS#7 block, and false otherwise.
 public String toString() 
    Returns the PKCS7 block in a printable string form.
 public SignerInfo[] verify() throws NoSuchAlgorithmException, SignatureException 
    Returns all signerInfos which self-verify.
 public SignerInfo[] verify(byte[] bytes) throws NoSuchAlgorithmException, SignatureException 
    Returns all signerInfos which self-verify.
 public SignerInfo verify(SignerInfo info,
    byte[] bytes) throws NoSuchAlgorithmException, SignatureException 
    This verifies a given SignerInfo.