Search in sources :

Example 16 with ASN1IA5String

use of com.github.zhenwei.core.asn1.ASN1IA5String in project LinLong-Java by zhenwei1108.

the class CMSTimeStampedGenerator method setMetaData.

/**
 * Set the MetaData for the generated message.
 *
 * @param hashProtected true if the MetaData should be included in first imprint calculation,
 *                      false otherwise.
 * @param fileName      optional file name, may be null.
 * @param mediaType     optional media type, may be null.
 * @param attributes    optional attributes, may be null.
 */
public void setMetaData(boolean hashProtected, String fileName, String mediaType, Attributes attributes) {
    ASN1UTF8String asn1FileName = null;
    if (fileName != null) {
        asn1FileName = new DERUTF8String(fileName);
    }
    ASN1IA5String asn1MediaType = null;
    if (mediaType != null) {
        asn1MediaType = new DERIA5String(mediaType);
    }
    setMetaData(hashProtected, asn1FileName, asn1MediaType, attributes);
}
Also used : DERUTF8String(com.github.zhenwei.core.asn1.DERUTF8String) DERIA5String(com.github.zhenwei.core.asn1.DERIA5String) ASN1UTF8String(com.github.zhenwei.core.asn1.ASN1UTF8String) ASN1IA5String(com.github.zhenwei.core.asn1.ASN1IA5String)

Aggregations

ASN1IA5String (org.bouncycastle.asn1.ASN1IA5String)8 ASN1IA5String (com.github.zhenwei.core.asn1.ASN1IA5String)6 ASN1OctetString (com.github.zhenwei.core.asn1.ASN1OctetString)4 IOException (java.io.IOException)4 DEROctetString (com.github.zhenwei.core.asn1.DEROctetString)3 ASN1BitString (com.github.zhenwei.core.asn1.ASN1BitString)2 ASN1ObjectIdentifier (com.github.zhenwei.core.asn1.ASN1ObjectIdentifier)2 ASN1UTF8String (com.github.zhenwei.core.asn1.ASN1UTF8String)2 BEROctetString (com.github.zhenwei.core.asn1.BEROctetString)2 DERBitString (com.github.zhenwei.core.asn1.DERBitString)2 CRLDistPoint (com.github.zhenwei.core.asn1.x509.CRLDistPoint)2 DistributionPoint (com.github.zhenwei.core.asn1.x509.DistributionPoint)2 GeneralName (com.github.zhenwei.core.asn1.x509.GeneralName)2 IssuingDistributionPoint (com.github.zhenwei.core.asn1.x509.IssuingDistributionPoint)2 LocaleString (com.github.zhenwei.core.i18n.LocaleString)2 Vector (java.util.Vector)2 ASN1IA5String (org.webpki.asn1.ASN1IA5String)2 ASN1ApplicationSpecific (com.github.zhenwei.core.asn1.ASN1ApplicationSpecific)1 ASN1BMPString (com.github.zhenwei.core.asn1.ASN1BMPString)1 ASN1Boolean (com.github.zhenwei.core.asn1.ASN1Boolean)1