public PKCS12BagAttributeSetter setFriendlyName(String name) { carrier.setBagAttribute(PKCSObjectIdentifiers.pkcs_9_at_friendlyName, new DERBMPString(name)); return this; }
public SpcString(String string) { unicode = new DERBMPString(string); }
public ASN1Encodable createDirectoryString(String text) { ParamUtil.requireNonNull("text", text); if (teletexString == this) { return new DERT61String(text); } else if (printableString == this) { return new DERPrintableString(text); } else if (utf8String == this) { return new DERUTF8String(text); } else if (bmpString == this) { return new DERBMPString(text); } else { throw new RuntimeException( "should not reach here, unknown DirectoryStringType " + this.name()); } }
break; case CONTENT_TYPE_BMPSTRING: contents = new DERBMPString(text); break; default:
break; case CONTENT_TYPE_BMPSTRING: contents = new DERBMPString(text); break; default:
public ASN1Encodable createString(String text) { Args.notNull(text, "text"); if (teletexString == this) { return new DERT61String(text); } else if (printableString == this) { return new DERPrintableString(text); } else if (utf8String == this) { return new DERUTF8String(text); } else if (bmpString == this) { return new DERBMPString(text); } else if (ia5String == this) { return new DERIA5String(text, true); } else { throw new IllegalStateException("should not reach here, unknown StringType " + this.name()); } }
/** * Return a BMP String from a tagged object. * * @param obj the tagged object holding the object we want * @param explicit true if the object is meant to be explicitly * tagged false otherwise. * @exception IllegalArgumentException if the tagged object cannot * be converted. * @return a DERBMPString instance. */ public static DERBMPString getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERBMPString) { return getInstance(o); } else { return new DERBMPString(ASN1OctetString.getInstance(o).getOctets()); } }
/** * return a BMP String from a tagged object. * * @param obj the tagged object holding the object we want * @param explicit true if the object is meant to be explicitly * tagged false otherwise. * @exception IllegalArgumentException if the tagged object cannot * be converted. * @return a DERBMPString instance. */ public static DERBMPString getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERBMPString) { return getInstance(o); } else { return new DERBMPString(ASN1OctetString.getInstance(o).getOctets()); } }
new DERBMPString("Primary Certificate")); new DERBMPString("Intermediate Certificate")); new DERBMPString("User Key")); eeCertBagBuilder.addBagAttribute(PKCSObjectIdentifiers.pkcs_9_at_localKeyId, extUtils.createSubjectKeyIdentifier(pubKey)); new CBCBlockCipher(new DESedeEngine())).build(passwdChars)); keyBagBuilder.addBagAttribute(PKCSObjectIdentifiers.pkcs_9_at_friendlyName, new DERBMPString("User Key")); keyBagBuilder.addBagAttribute(PKCSObjectIdentifiers.pkcs_9_at_localKeyId, extUtils.createSubjectKeyIdentifier(pubKey));
if (nm == null || !nm.getString().equals(name)) bagAttrs.setBagAttribute(pkcs_9_at_friendlyName, new DERBMPString(name)); kSeq.add(new DERSet(new DERBMPString(name))); if (nm == null || !nm.getString().equals(name)) bagAttrs.setBagAttribute(pkcs_9_at_friendlyName, new DERBMPString(name)); fSeq.add(new DERSet(new DERBMPString(name))); if (nm == null || !nm.getString().equals(certId)) bagAttrs.setBagAttribute(pkcs_9_at_friendlyName, new DERBMPString(certId)); fSeq.add(new DERSet(new DERBMPString(certId)));
new DERBMPString("User Key")); eeCertBagBuilder.addBagAttribute(PKCSObjectIdentifiers.pkcs_9_at_localKeyId, extUtils.createSubjectKeyIdentifier(pubKey)); new CBCBlockCipher(new DESedeEngine())).build(passwdChars)); keyBagBuilder.addBagAttribute(PKCSObjectIdentifiers.pkcs_9_at_friendlyName, new DERBMPString("User Key")); keyBagBuilder.addBagAttribute(PKCSObjectIdentifiers.pkcs_9_at_localKeyId, extUtils.createSubjectKeyIdentifier(pubKey));
return DERBitString.fromInputStream(defIn.getRemaining(), defIn); case BMP_STRING: return new DERBMPString(getBMPCharBuffer(defIn)); case BOOLEAN: return ASN1Boolean.fromOctetString(getBuffer(defIn, tmpBuffers));
return ASN1BitString.fromInputStream(defIn.getRemaining(), defIn); case BMP_STRING: return new DERBMPString(getBMPCharBuffer(defIn)); case BOOLEAN: return ASN1Boolean.fromOctetString(getBuffer(defIn, tmpBuffers));