Files
SuperVPN/output/Libraries/BouncyCastle.Crypto/Org/BouncyCastle/Pkcs/Pkcs12StoreBuilder.cs
2025-10-09 09:57:24 +09:00

37 lines
872 B
C#

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;
private bool useDerEncoding = false;
public Pkcs12Store Build()
{
return new Pkcs12Store(keyAlgorithm, certAlgorithm, useDerEncoding);
}
public Pkcs12StoreBuilder SetCertAlgorithm(DerObjectIdentifier certAlgorithm)
{
this.certAlgorithm = certAlgorithm;
return this;
}
public Pkcs12StoreBuilder SetKeyAlgorithm(DerObjectIdentifier keyAlgorithm)
{
this.keyAlgorithm = keyAlgorithm;
return this;
}
public Pkcs12StoreBuilder SetUseDerEncoding(bool useDerEncoding)
{
this.useDerEncoding = useDerEncoding;
return this;
}
}