3 instantiations of CoseKey
System.Security.Cryptography.Cose (3)
System\Security\Cryptography\Cose\CoseKey.cs (3)
44CoseKey coseKey = new(KeyType.RSA, coseAlgorithm, hashAlgorithm); 57CoseKey coseKey = new(KeyType.ECDsa, coseAlgorithm, hashAlgorithm); 69CoseKey coseKey = new(KeyType.MLDsa, coseAlgorithm, null);
56 references to CoseKey
System.Security.Cryptography.Cose (56)
System\Security\Cryptography\Cose\CoseHelpers.cs (2)
155CoseAlgorithm coseAlg = CoseKey.CoseAlgorithmFromInt64(alg); 167CoseAlgorithm alg = CoseKey.CoseAlgorithmFromString(reader.ReadTextString());
System\Security\Cryptography\Cose\CoseKey.cs (9)
37public static CoseKey FromKey(RSA key, RSASignaturePadding signaturePadding, HashAlgorithmName hashAlgorithm) 44CoseKey coseKey = new(KeyType.RSA, coseAlgorithm, hashAlgorithm); 51public static CoseKey FromKey(ECDsa key, HashAlgorithmName hashAlgorithm) 57CoseKey coseKey = new(KeyType.ECDsa, coseAlgorithm, hashAlgorithm); 64public static CoseKey FromKey(MLDsa key) 69CoseKey coseKey = new(KeyType.MLDsa, coseAlgorithm, null); 74internal static CoseKey FromUntrustedAlgorithmAndKey(CoseAlgorithm untrustedAlgorithm, IDisposable key) 110static CoseKey FromKeyWithExpectedAlgorithm(MLDsaAlgorithm expected, MLDsa key) 111=> key.Algorithm.Name == expected.Name ? FromKey(key) : CoseKey.FromKey(key);
System\Security\Cryptography\Cose\CoseSign1Message.cs (20)
395CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 438CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 469/// <seealso cref="VerifyDetached(CoseKey, ReadOnlySpan{byte}, ReadOnlySpan{byte})"/> 471public bool VerifyEmbedded(CoseKey key, ReadOnlySpan<byte> associatedData = default) 523CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 567CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 600public bool VerifyDetached(CoseKey key, ReadOnlySpan<byte> detachedContent, ReadOnlySpan<byte> associatedData = default) 670CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 709/// <seealso cref="VerifyDetachedAsync(CoseKey, Stream, ReadOnlyMemory{byte}, CancellationToken)"/> 711public bool VerifyDetached(CoseKey key, Stream detachedContent, ReadOnlySpan<byte> associatedData = default) 734private bool VerifyCore(CoseKey key, ReadOnlySpan<byte> contentBytes, Stream? contentStream, ReadOnlySpan<byte> associatedData) 837CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 878public Task<bool> VerifyDetachedAsync(CoseKey key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 901private async Task<bool> VerifyAsyncCore(CoseKey key, Stream content, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
System\Security\Cryptography\Cose\CoseSignature.cs (21)
110CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 141/// <seealso cref="VerifyDetached(CoseKey, ReadOnlySpan{byte}, ReadOnlySpan{byte})"/> 143public bool VerifyEmbedded(CoseKey key, ReadOnlySpan<byte> associatedData = default) 193CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 239CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 283CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 315/// <seealso cref="VerifyEmbedded(CoseKey, ReadOnlySpan{byte})"/> 317public bool VerifyDetached(CoseKey key, ReadOnlySpan<byte> detachedContent, ReadOnlySpan<byte> associatedData = default) 388CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 429public bool VerifyDetached(CoseKey key, Stream detachedContent, ReadOnlySpan<byte> associatedData = default) 511CoseKey coseKey = CoseKey.FromUntrustedAlgorithmAndKey(coseAlgorithm, key); 552/// <seealso cref="VerifyDetached(CoseKey, Stream, ReadOnlySpan{byte})"/> 554public Task<bool> VerifyDetachedAsync(CoseKey key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 577private async Task<bool> VerifyAsyncCore(CoseKey key, Stream content, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken) 608private bool VerifyCore(CoseKey key, ReadOnlySpan<byte> contentBytes, Stream? contentStream, ReadOnlySpan<byte> associatedData)
System\Security\Cryptography\Cose\CoseSigner.cs (4)
28internal CoseKey CoseKey { get; } 84CoseKey = CoseKey.FromKey((ECDsa)key, hashAlgorithm); 121CoseKey = CoseKey.FromKey(key, signaturePadding, hashAlgorithm); 135public CoseSigner(CoseKey key, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null)