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)
91
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
98
public static byte[] SignEmbedded(byte[] embeddedContent,
CoseSigner
signer, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, byte[]? associatedData = null)
122
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
129
public static byte[] SignDetached(ReadOnlySpan<byte> detachedContent,
CoseSigner
signer, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
149
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
156
public static byte[] SignEmbedded(ReadOnlySpan<byte> embeddedContent,
CoseSigner
signer, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
179
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
187
public static byte[] SignDetached(Stream detachedContent,
CoseSigner
signer, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null, ReadOnlySpan<byte> associatedData = default)
204
CoseSigner
signer,
245
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
254
CoseSigner
signer,
281
CoseSigner
signer,
312
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
319
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)
340
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
347
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)
350
private static bool TrySign(ReadOnlySpan<byte> content, Span<byte> destination,
CoseSigner
signer, CoseHeaderMap? protectedHeaders, CoseHeaderMap? unprotectedHeaders, out int bytesWritten, ReadOnlySpan<byte> associatedData, bool isDetached)
374
CoseSigner
signer,
400
CoseSigner
signer,
422
private static void ValidateBeforeSign(
CoseSigner
signer, CoseHeaderMap? protectedHeaders, CoseHeaderMap? unprotectedHeaders)
447
CoseSigner
signer,
473
CoseSigner
signer,
501
private static int ComputeEncodedSize(
CoseSigner
signer, CoseHeaderMap? protectedHeaders, CoseHeaderMap? unprotectedHeaders, int contentLength, bool isDetached)
641
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
649
public void AddSignatureForEmbedded(
CoseSigner
signer, byte[]? associatedData = null)
660
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
668
public void AddSignatureForEmbedded(
CoseSigner
signer, ReadOnlySpan<byte> associatedData)
692
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
700
public void AddSignatureForDetached(byte[] detachedContent,
CoseSigner
signer, byte[]? associatedData = null)
719
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
727
public void AddSignatureForDetached(ReadOnlySpan<byte> detachedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
755
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
763
public void AddSignatureForDetached(Stream detachedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
778
private void AddSignatureCore(ReadOnlySpan<byte> contentBytes, Stream? contentStream,
CoseSigner
signer, ReadOnlySpan<byte> associatedData)
831
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
839
public Task AddSignatureForDetachedAsync(Stream detachedContent,
CoseSigner
signer, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default)
854
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)
72
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
79
public static byte[] SignEmbedded(byte[] embeddedContent,
CoseSigner
signer, byte[]? associatedData = null)
100
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
107
public static byte[] SignDetached(ReadOnlySpan<byte> detachedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
125
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
132
public static byte[] SignEmbedded(ReadOnlySpan<byte> embeddedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
154
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
161
public static byte[] SignDetached(Stream detachedContent,
CoseSigner
signer, ReadOnlySpan<byte> associatedData = default)
178
internal static byte[] SignCore(ReadOnlySpan<byte> contentBytes, Stream? contentStream,
CoseSigner
signer, ReadOnlySpan<byte> associatedData, bool isDetached)
208
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
215
public static Task<byte[]> SignDetachedAsync(Stream detachedContent,
CoseSigner
signer, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default)
235
private static async Task<byte[]> SignAsyncCore(int expectedSize, Stream content,
CoseSigner
signer, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
256
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
263
public static bool TrySignDetached(ReadOnlySpan<byte> detachedContent, Span<byte> destination,
CoseSigner
signer, out int bytesWritten, ReadOnlySpan<byte> associatedData = default)
278
/// The <see cref="
CoseSigner
.ProtectedHeaders"/> and <see cref="
CoseSigner
.UnprotectedHeaders"/> collections in <paramref name="signer"/> have one or more labels in common.
285
public static bool TrySignEmbedded(ReadOnlySpan<byte> embeddedContent, Span<byte> destination,
CoseSigner
signer, out int bytesWritten, ReadOnlySpan<byte> associatedData = default)
288
private static bool TrySign(ReadOnlySpan<byte> content, Span<byte> destination,
CoseSigner
signer, out int bytesWritten, ReadOnlySpan<byte> associatedData, bool isDetached)
308
internal static void ValidateBeforeSign(
CoseSigner
signer)
321
private static int CreateCoseSign1Message(ReadOnlySpan<byte> contentBytes, Stream? contentStream, Span<byte> buffer,
CoseSigner
signer, ReadOnlySpan<byte> associatedData, bool isDetached)
344
private static async Task<int> CreateCoseSign1MessageAsync(Stream content, byte[] buffer,
CoseSigner
signer, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
764
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.
83
/// Initializes a new instance of the <see cref="
CoseSigner
"/> class.