19 instantiations of CngAlgorithm
System.Core (19)
System\Security\Cryptography\CngAlgorithm.cs (14)
109
s_rsa = new
CngAlgorithm
(BCryptNative.AlgorithmName.Rsa);
120
s_ecdh = new
CngAlgorithm
(BCryptNative.AlgorithmName.ECDH);
132
s_ecdhp256 = new
CngAlgorithm
(BCryptNative.AlgorithmName.ECDHP256);
144
s_ecdhp384 = new
CngAlgorithm
(BCryptNative.AlgorithmName.ECDHP384);
156
s_ecdhp521 = new
CngAlgorithm
(BCryptNative.AlgorithmName.ECDHP521);
168
s_ecdsa = new
CngAlgorithm
(BCryptNative.AlgorithmName.ECDsa);
180
s_ecdsap256 = new
CngAlgorithm
(BCryptNative.AlgorithmName.ECDsaP256);
192
s_ecdsap384 = new
CngAlgorithm
(BCryptNative.AlgorithmName.ECDsaP384);
204
s_ecdsap521 = new
CngAlgorithm
(BCryptNative.AlgorithmName.ECDsaP521);
216
s_md5 = new
CngAlgorithm
(BCryptNative.AlgorithmName.MD5);
228
s_sha1 = new
CngAlgorithm
(BCryptNative.AlgorithmName.Sha1);
240
s_sha256 = new
CngAlgorithm
(BCryptNative.AlgorithmName.Sha256);
252
s_sha384 = new
CngAlgorithm
(BCryptNative.AlgorithmName.Sha384);
264
s_sha512 = new
CngAlgorithm
(BCryptNative.AlgorithmName.Sha512);
System\Security\Cryptography\CngKey.cs (1)
83
return new
CngAlgorithm
(algorithm);
System\Security\Cryptography\ECDsaCng.cs (2)
453
using (BCryptHashAlgorithm hasher = new BCryptHashAlgorithm(new
CngAlgorithm
(hashAlgorithm.Name), BCryptNative.ProviderName.MicrosoftPrimitiveProvider)) {
464
using (BCryptHashAlgorithm hasher = new BCryptHashAlgorithm(new
CngAlgorithm
(hashAlgorithm.Name), BCryptNative.ProviderName.MicrosoftPrimitiveProvider)) {
System\Security\Cryptography\RsaCng.cs (2)
168
using (BCryptHashAlgorithm hasher = new BCryptHashAlgorithm(new
CngAlgorithm
(hashAlgorithm.Name), BCryptNative.ProviderName.MicrosoftPrimitiveProvider))
181
using (BCryptHashAlgorithm hasher = new BCryptHashAlgorithm(new
CngAlgorithm
(hashAlgorithm.Name), BCryptNative.ProviderName.MicrosoftPrimitiveProvider))
77 references to CngAlgorithm
System.Core (77)
System\Security\Cryptography\BCryptHashAlgorithm.cs (1)
67
public BCryptHashAlgorithm(
CngAlgorithm
algorithm, string implementation) {
System\Security\Cryptography\CngAlgorithm.cs (49)
19
public sealed class CngAlgorithm : IEquatable<
CngAlgorithm
> {
20
private static volatile
CngAlgorithm
s_ecdh;
21
private static volatile
CngAlgorithm
s_ecdhp256;
22
private static volatile
CngAlgorithm
s_ecdhp384;
23
private static volatile
CngAlgorithm
s_ecdhp521;
24
private static volatile
CngAlgorithm
s_ecdsa;
25
private static volatile
CngAlgorithm
s_ecdsap256;
26
private static volatile
CngAlgorithm
s_ecdsap384;
27
private static volatile
CngAlgorithm
s_ecdsap521;
28
private static volatile
CngAlgorithm
s_md5;
29
private static volatile
CngAlgorithm
s_sha1;
30
private static volatile
CngAlgorithm
s_sha256;
31
private static volatile
CngAlgorithm
s_sha384;
32
private static volatile
CngAlgorithm
s_sha512;
33
private static volatile
CngAlgorithm
s_rsa;
60
public static bool operator==(
CngAlgorithm
left,
CngAlgorithm
right) {
69
public static bool operator !=(
CngAlgorithm
left,
CngAlgorithm
right) {
80
return Equals(obj as
CngAlgorithm
);
83
public bool Equals(
CngAlgorithm
other) {
105
public static
CngAlgorithm
Rsa {
107
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
115
public static
CngAlgorithm
ECDiffieHellman {
117
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
127
public static
CngAlgorithm
ECDiffieHellmanP256 {
129
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
139
public static
CngAlgorithm
ECDiffieHellmanP384 {
141
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
151
public static
CngAlgorithm
ECDiffieHellmanP521 {
153
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
163
public static
CngAlgorithm
ECDsa {
165
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
175
public static
CngAlgorithm
ECDsaP256 {
177
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
187
public static
CngAlgorithm
ECDsaP384 {
189
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
199
public static
CngAlgorithm
ECDsaP521 {
201
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
211
public static
CngAlgorithm
MD5 {
213
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
223
public static
CngAlgorithm
Sha1 {
225
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
235
public static
CngAlgorithm
Sha256 {
237
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
247
public static
CngAlgorithm
Sha384 {
249
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
259
public static
CngAlgorithm
Sha512 {
261
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
System\Security\Cryptography\CngKey.cs (4)
76
public
CngAlgorithm
Algorithm {
398
public static CngKey Create(
CngAlgorithm
algorithm) {
403
public static CngKey Create(
CngAlgorithm
algorithm, string keyName) {
409
public static CngKey Create(
CngAlgorithm
algorithm, string keyName, CngKeyCreationParameters creationParameters) {
System\Security\Cryptography\ECDiffieHellmanCng.cs (8)
35
private
CngAlgorithm
m_hashAlgorithm =
CngAlgorithm
.Sha256;
121
public
CngAlgorithm
HashAlgorithm {
123
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
224
CngAlgorithm
algorithm = null;
227
algorithm =
CngAlgorithm
.ECDiffieHellmanP256;
231
algorithm =
CngAlgorithm
.ECDiffieHellmanP384;
235
algorithm =
CngAlgorithm
.ECDiffieHellmanP521;
System\Security\Cryptography\ECDsaCng.cs (8)
24
private
CngAlgorithm
m_hashAlgorithm =
CngAlgorithm
.Sha256;
102
public
CngAlgorithm
HashAlgorithm {
104
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
137
CngAlgorithm
algorithm = null;
140
algorithm =
CngAlgorithm
.ECDsaP256;
144
algorithm =
CngAlgorithm
.ECDsaP384;
148
algorithm =
CngAlgorithm
.ECDsaP521;
System\Security\Cryptography\MD5Cng.cs (1)
25
m_hashAlgorithm = new BCryptHashAlgorithm(
CngAlgorithm
.MD5,
System\Security\Cryptography\Rfc4050KeyFormatter.cs (1)
99
Contract.Ensures(Contract.Result<
CngAlgorithm
>() != null);
System\Security\Cryptography\RsaCng.cs (1)
103
_key = CngKey.Create(
CngAlgorithm
.Rsa, null, creationParameters);
System\Security\Cryptography\SHA1Cng.cs (1)
22
m_hashAlgorithm = new BCryptHashAlgorithm(
CngAlgorithm
.Sha1,
System\Security\Cryptography\SHA256Cng.cs (1)
21
m_hashAlgorithm = new BCryptHashAlgorithm(
CngAlgorithm
.Sha256,
System\Security\Cryptography\SHA384Cng.cs (1)
21
m_hashAlgorithm = new BCryptHashAlgorithm(
CngAlgorithm
.Sha384,
System\Security\Cryptography\SHA512Cng.cs (1)
21
m_hashAlgorithm = new BCryptHashAlgorithm(
CngAlgorithm
.Sha512,