26 references to KeyType
System.Security.Cryptography.Cose (26)
System\Security\Cryptography\Cose\CoseHelpers.cs (12)
110KeyType keyType = signer._keyType; 112if (keyType == KeyType.ECDsa) 118Debug.Assert(keyType == KeyType.RSA); 202KeyType keyType = signer._keyType; 204if (keyType == KeyType.ECDsa) 210Debug.Assert(keyType == KeyType.RSA); 259internal static HashAlgorithmName GetHashAlgorithmFromCoseAlgorithmAndKeyType(int algorithm, KeyType keyType, out RSASignaturePadding? padding) 261if (keyType == KeyType.ECDsa) 274Debug.Assert(keyType == KeyType.RSA); 298internal static KeyType GetKeyType(AsymmetricAlgorithm key) 302ECDsa => KeyType.ECDsa, 303RSA => KeyType.RSA,
System\Security\Cryptography\Cose\CoseSign1Message.cs (5)
573private bool VerifyCore(AsymmetricAlgorithm key, ReadOnlySpan<byte> contentBytes, Stream? contentStream, ReadOnlySpan<byte> associatedData, KeyType keyType) 668private async Task<bool> VerifyAsyncCore(AsymmetricAlgorithm key, Stream content, ReadOnlyMemory<byte> associatedData, KeyType keyType, CancellationToken cancellationToken) 699private bool VerifyHash(AsymmetricAlgorithm key, IncrementalHash hasher, HashAlgorithmName hashAlgorithm, KeyType keyType, RSASignaturePadding? padding) 708if (keyType == KeyType.ECDsa) 715Debug.Assert(keyType == KeyType.RSA);
System\Security\Cryptography\Cose\CoseSignature.cs (5)
358private async Task<bool> VerifyAsyncCore(AsymmetricAlgorithm key, Stream content, ReadOnlyMemory<byte> associatedData, KeyType keyType, CancellationToken cancellationToken) 392private bool VerifyCore(AsymmetricAlgorithm key, ReadOnlySpan<byte> contentBytes, Stream? contentStream, ReadOnlySpan<byte> associatedData, KeyType keyType) 424private bool VerifyHash(AsymmetricAlgorithm key, IncrementalHash hasher, HashAlgorithmName hashAlgorithm, KeyType keyType, RSASignaturePadding? padding) 433if (keyType == KeyType.ECDsa) 440Debug.Assert(keyType == KeyType.RSA);
System\Security\Cryptography\Cose\CoseSigner.cs (4)
13internal readonly KeyType _keyType; 158if (_keyType == KeyType.RSA) 174if (_keyType == KeyType.ECDsa) 185Debug.Assert(_keyType == KeyType.RSA);