1 instantiation of CoseSigner
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseSigner.cs (1)
46
/// <paramref name="key"/> is <see cref="RSA"/>, use <see cref="
CoseSigner
(RSA, RSASignaturePadding, HashAlgorithmName, CoseHeaderMap?, CoseHeaderMap?)"/> to specify a signature padding.
89 references to CoseSigner
System.Security.Cryptography.Cose (89)
System\Security\Cryptography\Cose\CoseHelpers.cs (3)
107
internal static int SignHash(
CoseSigner
signer, IncrementalHash hasher, Span<byte> destination)
199
internal static int ComputeSignatureSize(
CoseSigner
signer)
350
internal static void WriteSignature(Span<byte> buffer, IncrementalHash hasher, CborWriter writer,
CoseSigner
signer)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (53)
60
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
67
public static byte[] SignDetached(byte[] detachedContent,
CoseSigner
signer, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, byte[]? associatedData = null)
90
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
97
public static byte[] SignEmbedded(byte[] embeddedContent,
CoseSigner
signer, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, byte[]? associatedData = null)
120
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
127
public static byte[] SignDetached(ReadOnlySpan<byte> detachedContent,
CoseSigner
signer, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
147
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
154
public static byte[] SignEmbedded(ReadOnlySpan<byte> embeddedContent,
CoseSigner
signer, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
177
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
185
public static byte[] SignDetached(Stream detachedContent,
CoseSigner
signer, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
201
CoseSigner
signer,
241
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
250
CoseSigner
signer,
274
CoseSigner
signer,
305
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
312
public static bool TrySignDetached(ReadOnlySpan<byte> detachedContent, Span<byte> destination,
CoseSigner
signer, out int bytesWritten, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
333
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
340
public static bool TrySignEmbedded(ReadOnlySpan<byte> embeddedContent, Span<byte> destination,
CoseSigner
signer, out int bytesWritten, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
343
private static bool TrySign(ReadOnlySpan<byte> content, Span<byte> destination,
CoseSigner
signer, CoseHeaderMap? protectedHeaders, CoseHeaderMap? unprotectedHeaders, out int bytesWritten, ReadOnlySpan<byte> associatedData, bool isDetached)
366
CoseSigner
signer,
392
CoseSigner
signer,
414
private static void ValidateBeforeSign(
CoseSigner
signer, CoseHeaderMap? protectedHeaders, CoseHeaderMap? unprotectedHeaders)
439
CoseSigner
signer,
465
CoseSigner
signer,
493
private static int ComputeEncodedSize(
CoseSigner
signer, CoseHeaderMap? protectedHeaders, CoseHeaderMap? unprotectedHeaders, int contentLength, bool isDetached)
633
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
641
public void AddSignatureForEmbedded(
CoseSigner
signer, byte[]? associatedData = null)
652
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
660
public void AddSignatureForEmbedded(
CoseSigner
signer, ReadOnlySpan<byte> associatedData)
681
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
689
public void AddSignatureForDetached(byte[] detachedContent,
CoseSigner
signer, byte[]? associatedData = null)
705
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
713
public void AddSignatureForDetached(ReadOnlySpan<byte> detachedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
738
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
746
public void AddSignatureForDetached(Stream detachedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
758
private void AddSignatureCore(ReadOnlySpan<byte> contentBytes, Stream? contentStream,
CoseSigner
signer, ReadOnlySpan<byte> associatedData)
811
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
819
public Task AddSignatureForDetachedAsync(Stream detachedContent,
CoseSigner
signer, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default)
831
private async Task AddSignatureCoreAsync(Stream content,
CoseSigner
signer, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
System\Security\Cryptography\Cose\CoseSign1Message.cs (31)
44
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
51
public static byte[] SignDetached(byte[] detachedContent,
CoseSigner
signer, byte[]? associatedData = null)
69
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
76
public static byte[] SignEmbedded(byte[] embeddedContent,
CoseSigner
signer, byte[]? associatedData = null)
94
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
101
public static byte[] SignDetached(ReadOnlySpan<byte> detachedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
118
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
125
public static byte[] SignEmbedded(ReadOnlySpan<byte> embeddedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
146
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
153
public static byte[] SignDetached(Stream detachedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
167
internal static byte[] SignCore(ReadOnlySpan<byte> contentBytes, Stream? contentStream,
CoseSigner
signer, ReadOnlySpan<byte> associatedData, bool isDetached)
197
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
204
public static Task<byte[]> SignDetachedAsync(Stream detachedContent,
CoseSigner
signer, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default)
221
private static async Task<byte[]> SignAsyncCore(int expectedSize, Stream content,
CoseSigner
signer, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
242
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
249
public static bool TrySignDetached(ReadOnlySpan<byte> detachedContent, Span<byte> destination,
CoseSigner
signer, out int bytesWritten, ReadOnlySpan<byte> associatedData = default)
264
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
271
public static bool TrySignEmbedded(ReadOnlySpan<byte> embeddedContent, Span<byte> destination,
CoseSigner
signer, out int bytesWritten, ReadOnlySpan<byte> associatedData = default)
274
private static bool TrySign(ReadOnlySpan<byte> content, Span<byte> destination,
CoseSigner
signer, out int bytesWritten, ReadOnlySpan<byte> associatedData, bool isDetached)
293
internal static void ValidateBeforeSign(
CoseSigner
signer)
306
private static int CreateCoseSign1Message(ReadOnlySpan<byte> contentBytes, Stream? contentStream, Span<byte> buffer,
CoseSigner
signer, ReadOnlySpan<byte> associatedData, bool isDetached)
329
private static async Task<int> CreateCoseSign1MessageAsync(Stream content, byte[] buffer,
CoseSigner
signer, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
722
private static int ComputeEncodedSize(
CoseSigner
signer, int contentLength, bool isDetached)
System\Security\Cryptography\Cose\CoseSigner.cs (2)
37
/// Initializes a new instance of the <see cref="
CoseSigner
"/> class.
82
/// Initializes a new instance of the <see cref="
CoseSigner
"/> class.