diff --git a/src/libraries/Common/src/Internal/Cryptography/HashProvider.cs b/src/libraries/Common/src/Internal/Cryptography/HashProvider.cs
index cc47097a9b2992..97814426e84f6d 100644
--- a/src/libraries/Common/src/Internal/Cryptography/HashProvider.cs
+++ b/src/libraries/Common/src/Internal/Cryptography/HashProvider.cs
@@ -20,7 +20,7 @@ public void AppendHashData(byte[] data, int offset, int count)
// an invalid number of bytes read. Since our implementations of AppendHashDataCore
// end up using unsafe code, we want to be sure the arguments are valid.
if (data == null)
- throw new ArgumentNullException(nameof(data), SR.ArgumentNull_Buffer);
+ throw new ArgumentNullException(nameof(data));
if (offset < 0)
throw new ArgumentOutOfRangeException(nameof(offset), SR.ArgumentOutOfRange_NeedNonNegNum);
if (count < 0)
diff --git a/src/libraries/Common/src/Internal/Cryptography/Helpers.cs b/src/libraries/Common/src/Internal/Cryptography/Helpers.cs
index 25c826cc8fddc5..cb8733886d27e1 100644
--- a/src/libraries/Common/src/Internal/Cryptography/Helpers.cs
+++ b/src/libraries/Common/src/Internal/Cryptography/Helpers.cs
@@ -10,6 +10,22 @@ namespace Internal.Cryptography
{
internal static partial class Helpers
{
+ [UnsupportedOSPlatformGuard("browser")]
+ internal static bool HasSymmetricEncryption { get; } =
+#if NET5_0_OR_GREATER
+ !OperatingSystem.IsBrowser();
+#else
+ true;
+#endif
+
+ [UnsupportedOSPlatformGuard("browser")]
+ internal static bool HasHMAC { get; } =
+#if NET5_0_OR_GREATER
+ !OperatingSystem.IsBrowser();
+#else
+ true;
+#endif
+
#if NET5_0_OR_GREATER
[UnsupportedOSPlatformGuard("ios")]
[UnsupportedOSPlatformGuard("tvos")]
@@ -20,6 +36,7 @@ internal static partial class Helpers
#if NET5_0_OR_GREATER
[UnsupportedOSPlatformGuard("android")]
+ [UnsupportedOSPlatformGuard("browser")]
public static bool IsRC2Supported => !OperatingSystem.IsAndroid();
#else
public static bool IsRC2Supported => true;
diff --git a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoTransform.cs b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoTransform.cs
index a3a22165c6cebc..bd12894e5156cd 100644
--- a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoTransform.cs
+++ b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoTransform.cs
@@ -78,13 +78,13 @@ public int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, b
if (inputCount % InputBlockSize != 0)
throw new ArgumentOutOfRangeException(nameof(inputCount), SR.Cryptography_MustTransformWholeBlock);
if (inputCount > inputBuffer.Length - inputOffset)
- throw new ArgumentOutOfRangeException(nameof(inputCount), SR.Cryptography_TransformBeyondEndOfBuffer);
+ throw new ArgumentOutOfRangeException(nameof(inputCount), SR.Argument_InvalidOffLen);
if (outputBuffer == null)
throw new ArgumentNullException(nameof(outputBuffer));
if (outputOffset > outputBuffer.Length)
throw new ArgumentOutOfRangeException(nameof(outputOffset));
if (inputCount > outputBuffer.Length - outputOffset)
- throw new ArgumentOutOfRangeException(nameof(outputOffset), SR.Cryptography_TransformBeyondEndOfBuffer);
+ throw new ArgumentOutOfRangeException(nameof(outputOffset), SR.Argument_InvalidOffLen);
int numBytesWritten = UncheckedTransformBlock(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset);
Debug.Assert(numBytesWritten >= 0 && numBytesWritten <= inputCount);
@@ -102,7 +102,7 @@ public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int input
if (inputOffset > inputBuffer.Length)
throw new ArgumentOutOfRangeException(nameof(inputOffset));
if (inputCount > inputBuffer.Length - inputOffset)
- throw new ArgumentOutOfRangeException(nameof(inputCount), SR.Cryptography_TransformBeyondEndOfBuffer);
+ throw new ArgumentOutOfRangeException(nameof(inputCount), SR.Argument_InvalidOffLen);
byte[] output = UncheckedTransformFinalBlock(inputBuffer, inputOffset, inputCount);
return output;
diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs
index 431e6da9657ecd..60ac9390a9d0a6 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs
@@ -13,7 +13,7 @@ public partial class ECDsa : AsymmetricAlgorithm
///
/// Creates an instance of the platform specific implementation of the cref="ECDsa" algorithm.
///
- public static new ECDsa Create()
+ public static new partial ECDsa Create()
{
return new ECDsaImplementation.ECDsaSecurityTransforms();
}
@@ -24,7 +24,7 @@ public partial class ECDsa : AsymmetricAlgorithm
///
/// The representing the elliptic curve.
///
- public static ECDsa Create(ECCurve curve)
+ public static partial ECDsa Create(ECCurve curve)
{
ECDsa ecdsa = Create();
ecdsa.GenerateKey(curve);
@@ -37,7 +37,7 @@ public static ECDsa Create(ECCurve curve)
///
/// The representing the elliptic curve parameters.
///
- public static ECDsa Create(ECParameters parameters)
+ public static partial ECDsa Create(ECParameters parameters)
{
ECDsa ecdsa = Create();
ecdsa.ImportParameters(parameters);
diff --git a/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs b/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs
index 95c39e02acb0c8..22fff97677f615 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System.Diagnostics;
+using Internal.Cryptography;
namespace System.Security.Cryptography
{
@@ -15,25 +15,28 @@ public static int MacData(
ReadOnlySpan source,
Span destination)
{
- if (hashAlgorithm == HashAlgorithmName.SHA256)
+ if (Helpers.HasHMAC)
{
- return HMACSHA256.HashData(key, source, destination);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA1)
- {
- return HMACSHA1.HashData(key, source, destination);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA512)
- {
- return HMACSHA512.HashData(key, source, destination);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA384)
- {
- return HMACSHA384.HashData(key, source, destination);
- }
- else if (hashAlgorithm == HashAlgorithmName.MD5)
- {
- return HMACMD5.HashData(key, source, destination);
+ if (hashAlgorithm == HashAlgorithmName.SHA256)
+ {
+ return HMACSHA256.HashData(key, source, destination);
+ }
+ else if (hashAlgorithm == HashAlgorithmName.SHA1)
+ {
+ return HMACSHA1.HashData(key, source, destination);
+ }
+ else if (hashAlgorithm == HashAlgorithmName.SHA512)
+ {
+ return HMACSHA512.HashData(key, source, destination);
+ }
+ else if (hashAlgorithm == HashAlgorithmName.SHA384)
+ {
+ return HMACSHA384.HashData(key, source, destination);
+ }
+ else if (hashAlgorithm == HashAlgorithmName.MD5)
+ {
+ return HMACMD5.HashData(key, source, destination);
+ }
}
throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
diff --git a/src/libraries/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs b/src/libraries/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs
index dc1fd465acfe3b..c391e8323351ac 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs
@@ -74,6 +74,14 @@ internal static unsafe int Decrypt(
{
Debug.Assert(destination.Length >= encryptedData.Length);
+ if (!Helpers.HasSymmetricEncryption)
+ {
+ throw new CryptographicException(
+ SR.Format(
+ SR.Cryptography_UnknownAlgorithmIdentifier,
+ algorithmIdentifier.Algorithm));
+ }
+
// Don't check that algorithmIdentifier.Parameters is set here.
// Maybe some future PBES3 will have one with a default.
@@ -229,6 +237,14 @@ internal static void InitiateEncryption(
{
Debug.Assert(pbeParameters != null);
+ if (!Helpers.HasSymmetricEncryption)
+ {
+ throw new CryptographicException(
+ SR.Format(
+ SR.Cryptography_UnknownAlgorithmIdentifier,
+ pbeParameters.EncryptionAlgorithm));
+ }
+
isPkcs12 = false;
switch (pbeParameters.EncryptionAlgorithm)
@@ -258,7 +274,7 @@ internal static void InitiateEncryption(
throw new CryptographicException(
SR.Format(
SR.Cryptography_UnknownAlgorithmIdentifier,
- pbeParameters.HashAlgorithm.Name));
+ pbeParameters.EncryptionAlgorithm));
}
HashAlgorithmName prf = pbeParameters.HashAlgorithm;
@@ -377,6 +393,12 @@ internal static unsafe int Encrypt(
Debug.Assert(pwdTmpBytes!.Length == 0);
}
+ if (!Helpers.HasHMAC)
+ {
+ throw new CryptographicException(
+ SR.Format(SR.Cryptography_AlgorithmNotSupported, "HMAC" + prf.Name));
+ }
+
using (var pbkdf2 = new Rfc2898DeriveBytes(pwdTmpBytes, salt.ToArray(), iterationCount, prf))
{
derivedKey = pbkdf2.GetBytes(keySizeBytes);
@@ -518,6 +540,8 @@ private static unsafe int Pbes2Decrypt(
Rfc2898DeriveBytes pbkdf2 =
OpenPbkdf2(password, pbes2Params.KeyDerivationFunc.Parameters, out int? requestedKeyLength);
+ Debug.Assert(Helpers.HasHMAC);
+
using (pbkdf2)
{
// The biggest block size (for IV) we support is AES (128-bit / 16 byte)
@@ -556,6 +580,12 @@ private static SymmetricAlgorithm OpenCipher(
{
string? algId = encryptionScheme.Algorithm;
+ if (!Helpers.HasSymmetricEncryption)
+ {
+ throw new CryptographicException(
+ SR.Format(SR.Cryptography_AlgorithmNotSupported, algId));
+ }
+
if (algId == Oids.Aes128Cbc ||
algId == Oids.Aes192Cbc ||
algId == Oids.Aes256Cbc)
@@ -747,6 +777,12 @@ private static unsafe Rfc2898DeriveBytes OpenPbkdf2(
throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
}
+ if (!Helpers.HasHMAC)
+ {
+ throw new CryptographicException(
+ SR.Format(SR.Cryptography_AlgorithmNotSupported, "HMAC" + prf.Name));
+ }
+
int iterationCount = NormalizeIterationCount(pbkdf2Params.IterationCount);
ReadOnlyMemory saltMemory = pbkdf2Params.Salt.Specified.Value;
diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs
index aab2a5a5fb8225..f80a641a98f019 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs
@@ -14,7 +14,7 @@ namespace System.Security.Cryptography
#if INTERNAL_ASYMMETRIC_IMPLEMENTATIONS
public partial class RSA : AsymmetricAlgorithm
{
- public static new RSA Create() => new RSAImplementation.RSAOpenSsl();
+ public static new partial RSA Create() => new RSAImplementation.RSAOpenSsl();
}
internal static partial class RSAImplementation
diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs b/src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs
index 9c02118e27ed00..29ce858255e768 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs
@@ -16,7 +16,7 @@ namespace System.Security.Cryptography
#if INTERNAL_ASYMMETRIC_IMPLEMENTATIONS
public partial class RSA : AsymmetricAlgorithm
{
- public static new RSA Create()
+ public static new partial RSA Create()
{
return new RSAImplementation.RSASecurityTransforms();
}
diff --git a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
index 74b52350cf0f4b..39d6ef2c2db507 100644
--- a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
+++ b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
@@ -182,6 +182,9 @@ System.DirectoryServices.ActiveDirectory.DomainController
+
+
+
diff --git a/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj b/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj
index aef4cc97af217f..d1983aa0c10b9a 100644
--- a/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj
+++ b/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj
@@ -51,7 +51,7 @@
-
+
diff --git a/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.Forwards.cs b/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.Forwards.cs
index 5ba332dfd77fd0..5e138286de8e05 100644
--- a/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.Forwards.cs
+++ b/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.Forwards.cs
@@ -4,4 +4,63 @@
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.Aes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesCcm))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesGcm))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesManaged))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsymmetricKeyExchangeDeformatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsymmetricKeyExchangeFormatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsymmetricSignatureDeformatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsymmetricSignatureFormatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ChaCha20Poly1305))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CryptoConfig))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.DES))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.DSA))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.DSAParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.DSASignatureDeformatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.DSASignatureFormat))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.DSASignatureFormatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.DeriveBytes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECCurve))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDiffieHellman))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDiffieHellmanPublicKey))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDsa))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECPoint))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HKDF))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HMACMD5))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HMACSHA1))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HMACSHA256))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HMACSHA384))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HMACSHA512))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.IncrementalHash))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.MD5))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.MaskGenerationMethod))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.PKCS1MaskGenerationMethod))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RC2))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSA))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAEncryptionPadding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAEncryptionPaddingMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAOAEPKeyExchangeFormatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAPKCS1SignatureDeformatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAPKCS1SignatureFormatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSASignaturePadding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSASignaturePaddingMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RandomNumberGenerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.Rfc2898DeriveBytes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.Rijndael))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RijndaelManaged))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA1))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA1Managed))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA256))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA256Managed))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA384))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA384Managed))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA512))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA512Managed))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SignatureDescription))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.TripleDES))]
diff --git a/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.cs b/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.cs
deleted file mode 100644
index 86b9871075b1fd..00000000000000
--- a/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.cs
+++ /dev/null
@@ -1,964 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// ------------------------------------------------------------------------------
-// Changes to this file must follow the https://aka.ms/api-review process.
-// ------------------------------------------------------------------------------
-
-namespace System.Security.Cryptography
-{
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class Aes : System.Security.Cryptography.SymmetricAlgorithm
- {
- protected Aes() { }
- public static new System.Security.Cryptography.Aes Create() { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static new System.Security.Cryptography.Aes? Create(string algorithmName) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
- public sealed partial class AesCcm : System.IDisposable
- {
- public AesCcm(byte[] key) { }
- public AesCcm(System.ReadOnlySpan key) { }
- public static bool IsSupported { get { throw null; } }
- public static System.Security.Cryptography.KeySizes NonceByteSizes { get { throw null; } }
- public static System.Security.Cryptography.KeySizes TagByteSizes { get { throw null; } }
- public void Decrypt(byte[] nonce, byte[] ciphertext, byte[] tag, byte[] plaintext, byte[]? associatedData = null) { }
- public void Decrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan ciphertext, System.ReadOnlySpan tag, System.Span plaintext, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) { }
- public void Dispose() { }
- public void Encrypt(byte[] nonce, byte[] plaintext, byte[] ciphertext, byte[] tag, byte[]? associatedData = null) { }
- public void Encrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan plaintext, System.Span ciphertext, System.Span tag, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) { }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
- public sealed partial class AesGcm : System.IDisposable
- {
- public AesGcm(byte[] key) { }
- public AesGcm(System.ReadOnlySpan key) { }
- public static bool IsSupported { get { throw null; } }
- public static System.Security.Cryptography.KeySizes NonceByteSizes { get { throw null; } }
- public static System.Security.Cryptography.KeySizes TagByteSizes { get { throw null; } }
- public void Decrypt(byte[] nonce, byte[] ciphertext, byte[] tag, byte[] plaintext, byte[]? associatedData = null) { }
- public void Decrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan ciphertext, System.ReadOnlySpan tag, System.Span plaintext, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) { }
- public void Dispose() { }
- public void Encrypt(byte[] nonce, byte[] plaintext, byte[] ciphertext, byte[] tag, byte[]? associatedData = null) { }
- public void Encrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan plaintext, System.Span ciphertext, System.Span tag, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) { }
- }
- [System.ObsoleteAttribute("Derived cryptographic types are obsolete. Use the Create method on the base type instead.", DiagnosticId = "SYSLIB0021", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public sealed partial class AesManaged : System.Security.Cryptography.Aes
- {
- public AesManaged() { }
- public override int BlockSize { get { throw null; } set { } }
- public override int FeedbackSize { get { throw null; } set { } }
- public override byte[] IV { get { throw null; } set { } }
- public override byte[] Key { get { throw null; } set { } }
- public override int KeySize { get { throw null; } set { } }
- public override System.Security.Cryptography.KeySizes[] LegalBlockSizes { get { throw null; } }
- public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get { throw null; } }
- public override System.Security.Cryptography.CipherMode Mode { get { throw null; } set { } }
- public override System.Security.Cryptography.PaddingMode Padding { get { throw null; } set { } }
- public override System.Security.Cryptography.ICryptoTransform CreateDecryptor() { throw null; }
- public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[]? rgbIV) { throw null; }
- public override System.Security.Cryptography.ICryptoTransform CreateEncryptor() { throw null; }
- public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[]? rgbIV) { throw null; }
- protected override void Dispose(bool disposing) { }
- public override void GenerateIV() { }
- public override void GenerateKey() { }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class AsymmetricKeyExchangeDeformatter
- {
- protected AsymmetricKeyExchangeDeformatter() { }
- public abstract string? Parameters { get; set; }
- public abstract byte[] DecryptKeyExchange(byte[] rgb);
- public abstract void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key);
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class AsymmetricSignatureDeformatter
- {
- protected AsymmetricSignatureDeformatter() { }
- public abstract void SetHashAlgorithm(string strName);
- public abstract void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key);
- public abstract bool VerifySignature(byte[] rgbHash, byte[] rgbSignature);
- public virtual bool VerifySignature(System.Security.Cryptography.HashAlgorithm hash, byte[] rgbSignature) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class AsymmetricSignatureFormatter
- {
- protected AsymmetricSignatureFormatter() { }
- public abstract byte[] CreateSignature(byte[] rgbHash);
- public virtual byte[] CreateSignature(System.Security.Cryptography.HashAlgorithm hash) { throw null; }
- public abstract void SetHashAlgorithm(string strName);
- public abstract void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key);
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
- public sealed partial class ChaCha20Poly1305 : System.IDisposable
- {
- public ChaCha20Poly1305(byte[] key) { }
- public ChaCha20Poly1305(System.ReadOnlySpan key) { }
- public static bool IsSupported { get { throw null; } }
- public void Decrypt(byte[] nonce, byte[] ciphertext, byte[] tag, byte[] plaintext, byte[]? associatedData = null) { }
- public void Decrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan ciphertext, System.ReadOnlySpan tag, System.Span plaintext, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) { }
- public void Dispose() { }
- public void Encrypt(byte[] nonce, byte[] plaintext, byte[] ciphertext, byte[] tag, byte[]? associatedData = null) { }
- public void Encrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan plaintext, System.Span ciphertext, System.Span tag, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) { }
- }
- public partial class CryptoConfig
- {
- public CryptoConfig() { }
- public static bool AllowOnlyFipsAlgorithms { get { throw null; } }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public static void AddAlgorithm(System.Type algorithm, params string[] names) { }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public static void AddOID(string oid, params string[] names) { }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static object? CreateFromName(string name) { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static object? CreateFromName(string name, params object?[]? args) { throw null; }
- [System.ObsoleteAttribute("EncodeOID is obsolete. Use the ASN.1 functionality provided in System.Formats.Asn1.", DiagnosticId = "SYSLIB0031", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public static byte[] EncodeOID(string str) { throw null; }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public static string? MapNameToOID(string name) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class DeriveBytes : System.IDisposable
- {
- protected DeriveBytes() { }
- public void Dispose() { }
- protected virtual void Dispose(bool disposing) { }
- public abstract byte[] GetBytes(int cb);
- public abstract void Reset();
- }
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class DES : System.Security.Cryptography.SymmetricAlgorithm
- {
- protected DES() { }
- public override byte[] Key { get { throw null; } set { } }
- public static new System.Security.Cryptography.DES Create() { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static new System.Security.Cryptography.DES? Create(string algName) { throw null; }
- public static bool IsSemiWeakKey(byte[] rgbKey) { throw null; }
- public static bool IsWeakKey(byte[] rgbKey) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class DSA : System.Security.Cryptography.AsymmetricAlgorithm
- {
- protected DSA() { }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
- public static new System.Security.Cryptography.DSA Create() { throw null; }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
- public static System.Security.Cryptography.DSA Create(int keySizeInBits) { throw null; }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
- public static System.Security.Cryptography.DSA Create(System.Security.Cryptography.DSAParameters parameters) { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static new System.Security.Cryptography.DSA? Create(string algName) { throw null; }
- public abstract byte[] CreateSignature(byte[] rgbHash);
- public byte[] CreateSignature(byte[] rgbHash, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual byte[] CreateSignatureCore(System.ReadOnlySpan hash, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public abstract System.Security.Cryptography.DSAParameters ExportParameters(bool includePrivateParameters);
- public override void FromXmlString(string xmlString) { }
- public int GetMaxSignatureSize(System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- protected virtual byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan passwordBytes) { }
- public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan password) { }
- public override void ImportFromPem(System.ReadOnlySpan input) { }
- public abstract void ImportParameters(System.Security.Cryptography.DSAParameters parameters);
- public override void ImportPkcs8PrivateKey(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportSubjectPublicKeyInfo(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public virtual byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual byte[] SignDataCore(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual byte[] SignDataCore(System.ReadOnlySpan data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public override string ToXmlString(bool includePrivateParameters) { throw null; }
- public virtual bool TryCreateSignature(System.ReadOnlySpan hash, System.Span destination, out int bytesWritten) { throw null; }
- public bool TryCreateSignature(System.ReadOnlySpan hash, System.Span destination, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw null; }
- protected virtual bool TryCreateSignatureCore(System.ReadOnlySpan hash, System.Span destination, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw null; }
- public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportPkcs8PrivateKey(System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) { throw null; }
- protected virtual bool TryHashData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) { throw null; }
- public virtual bool TrySignData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) { throw null; }
- public bool TrySignData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw null; }
- protected virtual bool TrySignDataCore(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw null; }
- public bool VerifyData(byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public bool VerifyData(byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual bool VerifyData(byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public bool VerifyData(byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual bool VerifyData(System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public bool VerifyData(System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual bool VerifyDataCore(System.IO.Stream data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual bool VerifyDataCore(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public abstract bool VerifySignature(byte[] rgbHash, byte[] rgbSignature);
- public bool VerifySignature(byte[] rgbHash, byte[] rgbSignature, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual bool VerifySignature(System.ReadOnlySpan hash, System.ReadOnlySpan signature) { throw null; }
- public bool VerifySignature(System.ReadOnlySpan hash, System.ReadOnlySpan signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual bool VerifySignatureCore(System.ReadOnlySpan hash, System.ReadOnlySpan signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- }
- public partial struct DSAParameters
- {
- public int Counter;
- public byte[]? G;
- public byte[]? J;
- public byte[]? P;
- public byte[]? Q;
- public byte[]? Seed;
- public byte[]? X;
- public byte[]? Y;
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial class DSASignatureDeformatter : System.Security.Cryptography.AsymmetricSignatureDeformatter
- {
- public DSASignatureDeformatter() { }
- public DSASignatureDeformatter(System.Security.Cryptography.AsymmetricAlgorithm key) { }
- public override void SetHashAlgorithm(string strName) { }
- public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) { }
- public override bool VerifySignature(byte[] rgbHash, byte[] rgbSignature) { throw null; }
- }
- public enum DSASignatureFormat
- {
- IeeeP1363FixedFieldConcatenation = 0,
- Rfc3279DerSequence = 1,
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial class DSASignatureFormatter : System.Security.Cryptography.AsymmetricSignatureFormatter
- {
- public DSASignatureFormatter() { }
- public DSASignatureFormatter(System.Security.Cryptography.AsymmetricAlgorithm key) { }
- public override byte[] CreateSignature(byte[] rgbHash) { throw null; }
- public override void SetHashAlgorithm(string strName) { }
- public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) { }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial struct ECCurve
- {
- private object _dummy;
- private int _dummyPrimitive;
- public byte[]? A;
- public byte[]? B;
- public byte[]? Cofactor;
- public System.Security.Cryptography.ECCurve.ECCurveType CurveType;
- public System.Security.Cryptography.ECPoint G;
- public System.Security.Cryptography.HashAlgorithmName? Hash;
- public byte[]? Order;
- public byte[]? Polynomial;
- public byte[]? Prime;
- public byte[]? Seed;
- public bool IsCharacteristic2 { get { throw null; } }
- public bool IsExplicit { get { throw null; } }
- public bool IsNamed { get { throw null; } }
- public bool IsPrime { get { throw null; } }
- public System.Security.Cryptography.Oid Oid { get { throw null; } }
- public static System.Security.Cryptography.ECCurve CreateFromFriendlyName(string oidFriendlyName) { throw null; }
- public static System.Security.Cryptography.ECCurve CreateFromOid(System.Security.Cryptography.Oid curveOid) { throw null; }
- public static System.Security.Cryptography.ECCurve CreateFromValue(string oidValue) { throw null; }
- public void Validate() { }
- public enum ECCurveType
- {
- Implicit = 0,
- PrimeShortWeierstrass = 1,
- PrimeTwistedEdwards = 2,
- PrimeMontgomery = 3,
- Characteristic2 = 4,
- Named = 5,
- }
- public static partial class NamedCurves
- {
- public static System.Security.Cryptography.ECCurve brainpoolP160r1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP160t1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP192r1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP192t1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP224r1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP224t1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP256r1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP256t1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP320r1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP320t1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP384r1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP384t1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP512r1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve brainpoolP512t1 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve nistP256 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve nistP384 { get { throw null; } }
- public static System.Security.Cryptography.ECCurve nistP521 { get { throw null; } }
- }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class ECDiffieHellman : System.Security.Cryptography.AsymmetricAlgorithm
- {
- protected ECDiffieHellman() { }
- public override string KeyExchangeAlgorithm { get { throw null; } }
- public abstract System.Security.Cryptography.ECDiffieHellmanPublicKey PublicKey { get; }
- public override string? SignatureAlgorithm { get { throw null; } }
- public static new System.Security.Cryptography.ECDiffieHellman Create() { throw null; }
- public static System.Security.Cryptography.ECDiffieHellman Create(System.Security.Cryptography.ECCurve curve) { throw null; }
- public static System.Security.Cryptography.ECDiffieHellman Create(System.Security.Cryptography.ECParameters parameters) { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static new System.Security.Cryptography.ECDiffieHellman? Create(string algorithm) { throw null; }
- public byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public virtual byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? secretPrepend, byte[]? secretAppend) { throw null; }
- public byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey) { throw null; }
- public virtual byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey, byte[]? secretPrepend, byte[]? secretAppend) { throw null; }
- public virtual byte[] DeriveKeyMaterial(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey) { throw null; }
- public virtual byte[] DeriveKeyTls(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, byte[] prfLabel, byte[] prfSeed) { throw null; }
- public virtual byte[] ExportECPrivateKey() { throw null; }
- public virtual System.Security.Cryptography.ECParameters ExportExplicitParameters(bool includePrivateParameters) { throw null; }
- public virtual System.Security.Cryptography.ECParameters ExportParameters(bool includePrivateParameters) { throw null; }
- public override void FromXmlString(string xmlString) { }
- public virtual void GenerateKey(System.Security.Cryptography.ECCurve curve) { }
- public virtual void ImportECPrivateKey(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan passwordBytes) { }
- public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan password) { }
- public override void ImportFromPem(System.ReadOnlySpan input) { }
- public virtual void ImportParameters(System.Security.Cryptography.ECParameters parameters) { }
- public override void ImportPkcs8PrivateKey(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportSubjectPublicKeyInfo(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override string ToXmlString(bool includePrivateParameters) { throw null; }
- public virtual bool TryExportECPrivateKey(System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportPkcs8PrivateKey(System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) { throw null; }
- }
- public abstract partial class ECDiffieHellmanPublicKey : System.IDisposable
- {
- protected ECDiffieHellmanPublicKey() { }
- protected ECDiffieHellmanPublicKey(byte[] keyBlob) { }
- public void Dispose() { }
- protected virtual void Dispose(bool disposing) { }
- public virtual System.Security.Cryptography.ECParameters ExportExplicitParameters() { throw null; }
- public virtual System.Security.Cryptography.ECParameters ExportParameters() { throw null; }
- public virtual byte[] ExportSubjectPublicKeyInfo() { throw null; }
- public virtual byte[] ToByteArray() { throw null; }
- public virtual string ToXmlString() { throw null; }
- public virtual bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class ECDsa : System.Security.Cryptography.AsymmetricAlgorithm
- {
- protected ECDsa() { }
- public override string? KeyExchangeAlgorithm { get { throw null; } }
- public override string SignatureAlgorithm { get { throw null; } }
- public static new System.Security.Cryptography.ECDsa Create() { throw null; }
- public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECCurve curve) { throw null; }
- public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECParameters parameters) { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static new System.Security.Cryptography.ECDsa? Create(string algorithm) { throw null; }
- public virtual byte[] ExportECPrivateKey() { throw null; }
- public virtual System.Security.Cryptography.ECParameters ExportExplicitParameters(bool includePrivateParameters) { throw null; }
- public virtual System.Security.Cryptography.ECParameters ExportParameters(bool includePrivateParameters) { throw null; }
- public override void FromXmlString(string xmlString) { }
- public virtual void GenerateKey(System.Security.Cryptography.ECCurve curve) { }
- public int GetMaxSignatureSize(System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- protected virtual byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public virtual void ImportECPrivateKey(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan passwordBytes) { }
- public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan password) { }
- public override void ImportFromPem(System.ReadOnlySpan input) { }
- public virtual void ImportParameters(System.Security.Cryptography.ECParameters parameters) { }
- public override void ImportPkcs8PrivateKey(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportSubjectPublicKeyInfo(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public virtual byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual byte[] SignDataCore(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual byte[] SignDataCore(System.ReadOnlySpan data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public abstract byte[] SignHash(byte[] hash);
- public byte[] SignHash(byte[] hash, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual byte[] SignHashCore(System.ReadOnlySpan hash, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public override string ToXmlString(bool includePrivateParameters) { throw null; }
- public virtual bool TryExportECPrivateKey(System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportPkcs8PrivateKey(System.Span destination, out int bytesWritten) { throw null; }
- public override bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) { throw null; }
- protected virtual bool TryHashData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) { throw null; }
- public virtual bool TrySignData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) { throw null; }
- public bool TrySignData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw null; }
- protected virtual bool TrySignDataCore(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw null; }
- public virtual bool TrySignHash(System.ReadOnlySpan hash, System.Span destination, out int bytesWritten) { throw null; }
- public bool TrySignHash(System.ReadOnlySpan hash, System.Span destination, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw null; }
- protected virtual bool TrySignHashCore(System.ReadOnlySpan hash, System.Span destination, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw null; }
- public bool VerifyData(byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public bool VerifyData(byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual bool VerifyData(byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public bool VerifyData(byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public bool VerifyData(System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public bool VerifyData(System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual bool VerifyDataCore(System.IO.Stream data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual bool VerifyDataCore(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public abstract bool VerifyHash(byte[] hash, byte[] signature);
- public bool VerifyHash(byte[] hash, byte[] signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- public virtual bool VerifyHash(System.ReadOnlySpan hash, System.ReadOnlySpan signature) { throw null; }
- public bool VerifyHash(System.ReadOnlySpan hash, System.ReadOnlySpan signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- protected virtual bool VerifyHashCore(System.ReadOnlySpan hash, System.ReadOnlySpan signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial struct ECParameters
- {
- public System.Security.Cryptography.ECCurve Curve;
- public byte[]? D;
- public System.Security.Cryptography.ECPoint Q;
- public void Validate() { }
- }
- public partial struct ECPoint
- {
- public byte[]? X;
- public byte[]? Y;
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public static partial class HKDF
- {
- public static byte[] DeriveKey(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, byte[] ikm, int outputLength, byte[]? salt = null, byte[]? info = null) { throw null; }
- public static void DeriveKey(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.ReadOnlySpan ikm, System.Span output, System.ReadOnlySpan salt, System.ReadOnlySpan info) { }
- public static byte[] Expand(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, byte[] prk, int outputLength, byte[]? info = null) { throw null; }
- public static void Expand(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.ReadOnlySpan prk, System.Span output, System.ReadOnlySpan info) { }
- public static byte[] Extract(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, byte[] ikm, byte[]? salt = null) { throw null; }
- public static int Extract(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.ReadOnlySpan ikm, System.ReadOnlySpan salt, System.Span prk) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial class HMACMD5 : System.Security.Cryptography.HMAC
- {
- public HMACMD5() { }
- public HMACMD5(byte[] key) { }
- public override byte[] Key { get { throw null; } set { } }
- protected override void Dispose(bool disposing) { }
- protected override void HashCore(byte[] rgb, int ib, int cb) { }
- protected override void HashCore(System.ReadOnlySpan source) { }
- public static byte[] HashData(byte[] key, byte[] source) { throw null; }
- public static byte[] HashData(System.ReadOnlySpan key, System.ReadOnlySpan source) { throw null; }
- public static int HashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination) { throw null; }
- protected override byte[] HashFinal() { throw null; }
- public override void Initialize() { }
- public static bool TryHashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; }
- protected override bool TryHashFinal(System.Span destination, out int bytesWritten) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial class HMACSHA1 : System.Security.Cryptography.HMAC
- {
- public HMACSHA1() { }
- public HMACSHA1(byte[] key) { }
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.ObsoleteAttribute("HMACSHA1 always uses the algorithm implementation provided by the platform. Use a constructor without the useManagedSha1 parameter.", DiagnosticId = "SYSLIB0030", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- public HMACSHA1(byte[] key, bool useManagedSha1) { }
- public override byte[] Key { get { throw null; } set { } }
- protected override void Dispose(bool disposing) { }
- protected override void HashCore(byte[] rgb, int ib, int cb) { }
- protected override void HashCore(System.ReadOnlySpan source) { }
- public static byte[] HashData(byte[] key, byte[] source) { throw null; }
- public static byte[] HashData(System.ReadOnlySpan key, System.ReadOnlySpan source) { throw null; }
- public static int HashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination) { throw null; }
- protected override byte[] HashFinal() { throw null; }
- public override void Initialize() { }
- public static bool TryHashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; }
- protected override bool TryHashFinal(System.Span destination, out int bytesWritten) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial class HMACSHA256 : System.Security.Cryptography.HMAC
- {
- public HMACSHA256() { }
- public HMACSHA256(byte[] key) { }
- public override byte[] Key { get { throw null; } set { } }
- protected override void Dispose(bool disposing) { }
- protected override void HashCore(byte[] rgb, int ib, int cb) { }
- protected override void HashCore(System.ReadOnlySpan source) { }
- public static byte[] HashData(byte[] key, byte[] source) { throw null; }
- public static byte[] HashData(System.ReadOnlySpan key, System.ReadOnlySpan source) { throw null; }
- public static int HashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination) { throw null; }
- protected override byte[] HashFinal() { throw null; }
- public override void Initialize() { }
- public static bool TryHashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; }
- protected override bool TryHashFinal(System.Span destination, out int bytesWritten) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial class HMACSHA384 : System.Security.Cryptography.HMAC
- {
- public HMACSHA384() { }
- public HMACSHA384(byte[] key) { }
- public override byte[] Key { get { throw null; } set { } }
- [System.ObsoleteAttribute("ProduceLegacyHmacValues is obsolete. Producing legacy HMAC values is not supported.", DiagnosticId = "SYSLIB0029", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- public bool ProduceLegacyHmacValues { get { throw null; } set { } }
- protected override void Dispose(bool disposing) { }
- protected override void HashCore(byte[] rgb, int ib, int cb) { }
- protected override void HashCore(System.ReadOnlySpan source) { }
- public static byte[] HashData(byte[] key, byte[] source) { throw null; }
- public static byte[] HashData(System.ReadOnlySpan key, System.ReadOnlySpan source) { throw null; }
- public static int HashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination) { throw null; }
- protected override byte[] HashFinal() { throw null; }
- public override void Initialize() { }
- public static bool TryHashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; }
- protected override bool TryHashFinal(System.Span destination, out int bytesWritten) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial class HMACSHA512 : System.Security.Cryptography.HMAC
- {
- public HMACSHA512() { }
- public HMACSHA512(byte[] key) { }
- public override byte[] Key { get { throw null; } set { } }
- [System.ObsoleteAttribute("ProduceLegacyHmacValues is obsolete. Producing legacy HMAC values is not supported.", DiagnosticId = "SYSLIB0029", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- public bool ProduceLegacyHmacValues { get { throw null; } set { } }
- protected override void Dispose(bool disposing) { }
- protected override void HashCore(byte[] rgb, int ib, int cb) { }
- protected override void HashCore(System.ReadOnlySpan source) { }
- public static byte[] HashData(byte[] key, byte[] source) { throw null; }
- public static byte[] HashData(System.ReadOnlySpan key, System.ReadOnlySpan source) { throw null; }
- public static int HashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination) { throw null; }
- protected override byte[] HashFinal() { throw null; }
- public override void Initialize() { }
- public static bool TryHashData(System.ReadOnlySpan key, System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; }
- protected override bool TryHashFinal(System.Span destination, out int bytesWritten) { throw null; }
- }
- public sealed partial class IncrementalHash : System.IDisposable
- {
- internal IncrementalHash() { }
- public System.Security.Cryptography.HashAlgorithmName AlgorithmName { get { throw null; } }
- public int HashLengthInBytes { get { throw null; } }
- public void AppendData(byte[] data) { }
- public void AppendData(byte[] data, int offset, int count) { }
- public void AppendData(System.ReadOnlySpan data) { }
- public static System.Security.Cryptography.IncrementalHash CreateHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key) { throw null; }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan key) { throw null; }
- public void Dispose() { }
- public byte[] GetCurrentHash() { throw null; }
- public int GetCurrentHash(System.Span destination) { throw null; }
- public byte[] GetHashAndReset() { throw null; }
- public int GetHashAndReset(System.Span destination) { throw null; }
- public bool TryGetCurrentHash(System.Span destination, out int bytesWritten) { throw null; }
- public bool TryGetHashAndReset(System.Span destination, out int bytesWritten) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class MaskGenerationMethod
- {
- protected MaskGenerationMethod() { }
- public abstract byte[] GenerateMask(byte[] rgbSeed, int cbReturn);
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class MD5 : System.Security.Cryptography.HashAlgorithm
- {
- protected MD5() { }
- public static new System.Security.Cryptography.MD5 Create() { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static new System.Security.Cryptography.MD5? Create(string algName) { throw null; }
- public static byte[] HashData(byte[] source) { throw null; }
- public static byte[] HashData(System.ReadOnlySpan source) { throw null; }
- public static int HashData(System.ReadOnlySpan source, System.Span destination) { throw null; }
- public static bool TryHashData(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial class PKCS1MaskGenerationMethod : System.Security.Cryptography.MaskGenerationMethod
- {
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("PKCS1MaskGenerationMethod is not trim compatible because the algorithm implementation referenced by HashName might be removed.")]
- public PKCS1MaskGenerationMethod() { }
- public string HashName { get { throw null; } set { } }
- public override byte[] GenerateMask(byte[] rgbSeed, int cbReturn) { throw null; }
- }
- public abstract partial class RandomNumberGenerator : System.IDisposable
- {
- protected RandomNumberGenerator() { }
- public static System.Security.Cryptography.RandomNumberGenerator Create() { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public static System.Security.Cryptography.RandomNumberGenerator? Create(string rngName) { throw null; }
- public void Dispose() { }
- protected virtual void Dispose(bool disposing) { }
- public static void Fill(System.Span data) { }
- public abstract void GetBytes(byte[] data);
- public virtual void GetBytes(byte[] data, int offset, int count) { }
- public static byte[] GetBytes(int count) { throw null; }
- public virtual void GetBytes(System.Span data) { }
- public static int GetInt32(int toExclusive) { throw null; }
- public static int GetInt32(int fromInclusive, int toExclusive) { throw null; }
- public virtual void GetNonZeroBytes(byte[] data) { }
- public virtual void GetNonZeroBytes(System.Span data) { }
- }
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class RC2 : System.Security.Cryptography.SymmetricAlgorithm
- {
- protected int EffectiveKeySizeValue;
- protected RC2() { }
- public virtual int EffectiveKeySize { get { throw null; } set { } }
- public override int KeySize { get { throw null; } set { } }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("android")]
- public static new System.Security.Cryptography.RC2 Create() { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static new System.Security.Cryptography.RC2? Create(string AlgName) { throw null; }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public partial class Rfc2898DeriveBytes : System.Security.Cryptography.DeriveBytes
- {
- public Rfc2898DeriveBytes(byte[] password, byte[] salt, int iterations) { }
- public Rfc2898DeriveBytes(byte[] password, byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { }
- public Rfc2898DeriveBytes(string password, byte[] salt) { }
- public Rfc2898DeriveBytes(string password, byte[] salt, int iterations) { }
- public Rfc2898DeriveBytes(string password, byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { }
- public Rfc2898DeriveBytes(string password, int saltSize) { }
- public Rfc2898DeriveBytes(string password, int saltSize, int iterations) { }
- public Rfc2898DeriveBytes(string password, int saltSize, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { }
- public System.Security.Cryptography.HashAlgorithmName HashAlgorithm { get { throw null; } }
- public int IterationCount { get { throw null; } set { } }
- public byte[] Salt { get { throw null; } set { } }
- [System.ObsoleteAttribute("Rfc2898DeriveBytes.CryptDeriveKey is obsolete and is not supported. Use PasswordDeriveBytes.CryptDeriveKey instead.", DiagnosticId = "SYSLIB0033", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- public byte[] CryptDeriveKey(string algname, string alghashname, int keySize, byte[] rgbIV) { throw null; }
- protected override void Dispose(bool disposing) { }
- public override byte[] GetBytes(int cb) { throw null; }
- public static byte[] Pbkdf2(byte[] password, byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int outputLength) { throw null; }
- public static byte[] Pbkdf2(System.ReadOnlySpan password, System.ReadOnlySpan salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int outputLength) { throw null; }
- public static void Pbkdf2(System.ReadOnlySpan password, System.ReadOnlySpan salt, System.Span destination, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { }
- public static byte[] Pbkdf2(System.ReadOnlySpan password, System.ReadOnlySpan salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int outputLength) { throw null; }
- public static void Pbkdf2(System.ReadOnlySpan password, System.ReadOnlySpan salt, System.Span destination, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { }
- public static byte[] Pbkdf2(string password, byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int outputLength) { throw null; }
- public override void Reset() { }
- }
- [System.ObsoleteAttribute("The Rijndael and RijndaelManaged types are obsolete. Use Aes instead.", DiagnosticId = "SYSLIB0022", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class Rijndael : System.Security.Cryptography.SymmetricAlgorithm
- {
- protected Rijndael() { }
- public static new System.Security.Cryptography.Rijndael Create() { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static new System.Security.Cryptography.Rijndael? Create(string algName) { throw null; }
- }
- [System.ObsoleteAttribute("The Rijndael and RijndaelManaged types are obsolete. Use Aes instead.", DiagnosticId = "SYSLIB0022", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public sealed partial class RijndaelManaged : System.Security.Cryptography.Rijndael
- {
- public RijndaelManaged() { }
- public override int BlockSize { get { throw null; } set { } }
- public override int FeedbackSize { get { throw null; } set { } }
- public override byte[] IV { get { throw null; } set { } }
- public override byte[] Key { get { throw null; } set { } }
- public override int KeySize { get { throw null; } set { } }
- public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get { throw null; } }
- public override System.Security.Cryptography.CipherMode Mode { get { throw null; } set { } }
- public override System.Security.Cryptography.PaddingMode Padding { get { throw null; } set { } }
- public override System.Security.Cryptography.ICryptoTransform CreateDecryptor() { throw null; }
- public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[]? rgbIV) { throw null; }
- public override System.Security.Cryptography.ICryptoTransform CreateEncryptor() { throw null; }
- public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[]? rgbIV) { throw null; }
- protected override void Dispose(bool disposing) { }
- public override void GenerateIV() { }
- public override void GenerateKey() { }
- }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
- public abstract partial class RSA : System.Security.Cryptography.AsymmetricAlgorithm
- {
- protected RSA() { }
- public override string? KeyExchangeAlgorithm { get { throw null; } }
- public override string SignatureAlgorithm { get { throw null; } }
- public static new System.Security.Cryptography.RSA Create() { throw null; }
- public static System.Security.Cryptography.RSA Create(int keySizeInBits) { throw null; }
- public static System.Security.Cryptography.RSA Create(System.Security.Cryptography.RSAParameters parameters) { throw null; }
- [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
- public static new System.Security.Cryptography.RSA? Create(string algName) { throw null; }
- public virtual byte[] Decrypt(byte[] data, System.Security.Cryptography.RSAEncryptionPadding padding) { throw null; }
- public virtual byte[] DecryptValue(byte[] rgb) { throw null; }
- public virtual byte[] Encrypt(byte[] data, System.Security.Cryptography.RSAEncryptionPadding padding) { throw null; }
- public virtual byte[] EncryptValue(byte[] rgb) { throw null; }
- public abstract System.Security.Cryptography.RSAParameters ExportParameters(bool includePrivateParameters);
- public virtual byte[] ExportRSAPrivateKey() { throw null; }
- public virtual byte[] ExportRSAPublicKey() { throw null; }
- public override void FromXmlString(string xmlString) { }
- protected virtual byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- protected virtual byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
- public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan passwordBytes) { }
- public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan password) { }
- public override void ImportFromPem(System.ReadOnlySpan input) { }
- public abstract void ImportParameters(System.Security.Cryptography.RSAParameters parameters);
- public override void ImportPkcs8PrivateKey(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public virtual void ImportRSAPrivateKey(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public virtual void ImportRSAPublicKey(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public override void ImportSubjectPublicKeyInfo(System.ReadOnlySpan source, out int bytesRead) { throw null; }
- public virtual byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw null; }
- public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw null; }
- public virtual byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw null; }
- public virtual byte[] SignHash(byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw null; }
- public override string ToXmlString(bool includePrivateParameters) { throw null; }
- public virtual bool TryDecrypt(System.ReadOnlySpan