-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
SignedCms.CtorOverloads.cs
38 lines (31 loc) · 1.19 KB
/
SignedCms.CtorOverloads.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Internal.Cryptography;
namespace System.Security.Cryptography.Pkcs
{
public sealed partial class SignedCms
{
private static ContentInfo MakeEmptyContentInfo() =>
new ContentInfo(Oids.Pkcs7DataOid.CopyOid(), Array.Empty<byte>());
public SignedCms()
: this(SubjectIdentifierType.IssuerAndSerialNumber, MakeEmptyContentInfo(), false)
{
}
public SignedCms(SubjectIdentifierType signerIdentifierType)
: this(signerIdentifierType, MakeEmptyContentInfo(), false)
{
}
public SignedCms(ContentInfo contentInfo)
: this(SubjectIdentifierType.IssuerAndSerialNumber, contentInfo, false)
{
}
public SignedCms(SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo)
: this(signerIdentifierType, contentInfo, false)
{
}
public SignedCms(ContentInfo contentInfo, bool detached)
: this(SubjectIdentifierType.IssuerAndSerialNumber, contentInfo, detached)
{
}
}
}