/// <summary> /// Add a SafeBag that is to be wrapped in a EncryptedData object. /// </summary> /// <param name="dataEncryptor">the encryptor to use for encoding the data.</param> /// <param name="data">the SafeBag to include.</param> /// <returns>this builder.</returns> public Pkcs12PfxPduBuilder AddEncryptedData(ICipherBuilder <AlgorithmIdentifier> dataEncryptor, Pkcs12SafeBag data) { return(addEncryptedData(dataEncryptor, new DerSequence(data.ToAsn1Structure()))); }
/// <summary> /// Add a SafeBag that is to be included as is. /// </summary> /// <param name="data">the SafeBag to add.</param> /// <returns>this builder.</returns> public Pkcs12PfxPduBuilder AddData(Pkcs12SafeBag data) { dataVector.Add(new ContentInfo(PkcsObjectIdentifiers.Data, new DerOctetString(new DerSequence(data.ToAsn1Structure()).GetEncoded()))); return(this); }