iTextSharp-LGPL/src/core/srcbc/pkcs/PKCS12StoreBuilder.cs

35 lines
797 B
C#

using System;
using Org.BouncyCastle.Asn1;
using Org.BouncyCastle.Asn1.Pkcs;
namespace Org.BouncyCastle.Pkcs
{
public class Pkcs12StoreBuilder
{
private DerObjectIdentifier keyAlgorithm = PkcsObjectIdentifiers.PbeWithShaAnd3KeyTripleDesCbc;
private DerObjectIdentifier certAlgorithm = PkcsObjectIdentifiers.PbewithShaAnd40BitRC2Cbc;
public Pkcs12StoreBuilder()
{
}
public Pkcs12Store Build()
{
return new Pkcs12Store(keyAlgorithm, certAlgorithm);
}
public Pkcs12StoreBuilder SetCertAlgorithm(DerObjectIdentifier certAlgorithm)
{
this.certAlgorithm = certAlgorithm;
return this;
}
public Pkcs12StoreBuilder SetKeyAlgorithm(DerObjectIdentifier keyAlgorithm)
{
this.keyAlgorithm = keyAlgorithm;
return this;
}
}
}