26 references to KnownCoseAlgorithms
System.Security.Cryptography.Cose (26)
System\Security\Cryptography\Cose\CoseHelpers.cs (17)
222KnownCoseAlgorithms.ThrowUnsignedIntegerNotSupported(reader.ReadUInt64()); 230KnownCoseAlgorithms.ThrowCborNegativeIntegerNotSupported(cborNegativeIntRepresentation); 234KnownCoseAlgorithms.ThrowIfNotSupported(alg); 246int alg = KnownCoseAlgorithms.FromString(reader.ReadTextString()); 266KnownCoseAlgorithms.ES256 => HashAlgorithmName.SHA256, 267KnownCoseAlgorithms.ES384 => HashAlgorithmName.SHA384, 268KnownCoseAlgorithms.ES512 => HashAlgorithmName.SHA512, 277KnownCoseAlgorithms.PS256 or KnownCoseAlgorithms.RS256 => HashAlgorithmName.SHA256, 278KnownCoseAlgorithms.PS384 or KnownCoseAlgorithms.RS384 => HashAlgorithmName.SHA384, 279KnownCoseAlgorithms.PS512 or KnownCoseAlgorithms.RS512 => HashAlgorithmName.SHA512, 283if (algorithm <= KnownCoseAlgorithms.RS256) 285Debug.Assert(algorithm >= KnownCoseAlgorithms.RS512); 290Debug.Assert(algorithm >= KnownCoseAlgorithms.PS512 && algorithm <= KnownCoseAlgorithms.PS256);
System\Security\Cryptography\Cose\CoseSigner.cs (9)
182nameof(HashAlgorithmName.SHA256) => KnownCoseAlgorithms.ES256, 183nameof(HashAlgorithmName.SHA384) => KnownCoseAlgorithms.ES384, 184nameof(HashAlgorithmName.SHA512) => KnownCoseAlgorithms.ES512, 196nameof(HashAlgorithmName.SHA256) => KnownCoseAlgorithms.PS256, 197nameof(HashAlgorithmName.SHA384) => KnownCoseAlgorithms.PS384, 198nameof(HashAlgorithmName.SHA512) => KnownCoseAlgorithms.PS512, 207nameof(HashAlgorithmName.SHA256) => KnownCoseAlgorithms.RS256, 208nameof(HashAlgorithmName.SHA384) => KnownCoseAlgorithms.RS384, 209nameof(HashAlgorithmName.SHA512) => KnownCoseAlgorithms.RS512,