2 instantiations of RSAEncryptionPadding
System.Security.Cryptography (2)
System\Security\Cryptography\RSAEncryptionPadding.cs (2)
16public static RSAEncryptionPadding Pkcs1 { get; } = new RSAEncryptionPadding(RSAEncryptionPaddingMode.Pkcs1, default); 70return new RSAEncryptionPadding(RSAEncryptionPaddingMode.Oaep, hashAlgorithm);
95 references to RSAEncryptionPadding
Microsoft.DotNet.HotReload.Watch (1)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\SharedSecretProvider.cs (1)
20=> Convert.ToBase64String(_rsa.Decrypt(Convert.FromBase64String(secret), RSAEncryptionPadding.OaepSHA256));
Microsoft.Extensions.DotNetDeltaApplier (1)
src\sdk\src\Dotnet.Watch\HotReloadAgent.Host\WebSocketTransport.cs (1)
145var encrypted = rsa.Encrypt(secret, RSAEncryptionPadding.OaepSHA256);
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
910[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAEncryptionPadding))]
netstandard (1)
netstandard.cs (1)
1914[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAEncryptionPadding))]
System.Security.Cryptography (64)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (8)
19public override byte[] Encrypt(byte[] data, RSAEncryptionPadding padding) => 23public override byte[] Decrypt(byte[] data, RSAEncryptionPadding padding) => 27public override bool TryEncrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten) => 31public override bool TryDecrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten) => 36private unsafe byte[] EncryptOrDecrypt(byte[] data, RSAEncryptionPadding padding, bool encrypt) 65if (padding == RSAEncryptionPadding.Pkcs1) 119private unsafe bool TryEncryptOrDecrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, bool encrypt, out int bytesWritten) 147if (padding == RSAEncryptionPadding.Pkcs1)
System\Security\Cryptography\RSA.cs (22)
91public virtual byte[] Encrypt(byte[] data, RSAEncryptionPadding padding) => throw DerivedClassMustOverride(); 92public virtual byte[] Decrypt(byte[] data, RSAEncryptionPadding padding) => throw DerivedClassMustOverride(); 102public virtual bool TryDecrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten) 117public virtual bool TryEncrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding, out int bytesWritten) 155/// This implementation has not implemented one of <see cref="Encrypt(byte[], RSAEncryptionPadding)" /> or 158/// <seealso cref="Encrypt(byte[], RSAEncryptionPadding)" /> 159/// <seealso cref="Encrypt(ReadOnlySpan{byte}, Span{byte}, RSAEncryptionPadding)" /> 161public byte[] Encrypt(ReadOnlySpan<byte> data, RSAEncryptionPadding padding) 169RSAEncryptionPadding padding, 205/// This implementation has not implemented one of <see cref="Encrypt(byte[], RSAEncryptionPadding)" /> or 208/// <seealso cref="Encrypt(byte[], RSAEncryptionPadding)" /> 209/// <seealso cref="Encrypt(ReadOnlySpan{byte}, RSAEncryptionPadding)" /> 211public int Encrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding) 242/// This implementation has not implemented one of <see cref="Decrypt(byte[], RSAEncryptionPadding)" /> or 245/// <seealso cref="Decrypt(byte[], RSAEncryptionPadding)" /> 246/// <seealso cref="Decrypt(ReadOnlySpan{byte}, Span{byte}, RSAEncryptionPadding)" /> 248public byte[] Decrypt(ReadOnlySpan<byte> data, RSAEncryptionPadding padding) 256RSAEncryptionPadding padding, 288/// This implementation has not implemented one of <see cref="Decrypt(byte[], RSAEncryptionPadding)" /> or 291/// <seealso cref="Decrypt(byte[], RSAEncryptionPadding)" /> 292/// <seealso cref="Decrypt(ReadOnlySpan{byte}, RSAEncryptionPadding)" /> 294public int Decrypt(ReadOnlySpan<byte> data, Span<byte> destination, RSAEncryptionPadding padding)
System\Security\Cryptography\RSABCrypt.cs (4)
120public override byte[] Encrypt(byte[] data, RSAEncryptionPadding padding) 132public override byte[] Decrypt(byte[] data, RSAEncryptionPadding padding) 182RSAEncryptionPadding padding, 216RSAEncryptionPadding padding,
System\Security\Cryptography\RSACryptoServiceProvider.Windows.cs (10)
266return Decrypt(rgb, fOAEP ? RSAEncryptionPadding.OaepSHA1 : RSAEncryptionPadding.Pkcs1); 312return Encrypt(rgb, fOAEP ? RSAEncryptionPadding.OaepSHA1 : RSAEncryptionPadding.Pkcs1); 563public override byte[] Encrypt(byte[] data, RSAEncryptionPadding padding) 570if (padding == RSAEncryptionPadding.Pkcs1) 574else if (padding == RSAEncryptionPadding.OaepSHA1) 598public override byte[] Decrypt(byte[] data, RSAEncryptionPadding padding) 605if (padding == RSAEncryptionPadding.Pkcs1) 609else if (padding == RSAEncryptionPadding.OaepSHA1)
System\Security\Cryptography\RSAEncryptionPadding.cs (16)
11public sealed class RSAEncryptionPadding : IEquatable<RSAEncryptionPadding> 16public static RSAEncryptionPadding Pkcs1 { get; } = new RSAEncryptionPadding(RSAEncryptionPaddingMode.Pkcs1, default); 21public static RSAEncryptionPadding OaepSHA1 { get; } = CreateOaep(HashAlgorithmName.SHA1); 26public static RSAEncryptionPadding OaepSHA256 { get; } = CreateOaep(HashAlgorithmName.SHA256); 31public static RSAEncryptionPadding OaepSHA384 { get; } = CreateOaep(HashAlgorithmName.SHA384); 36public static RSAEncryptionPadding OaepSHA512 { get; } = CreateOaep(HashAlgorithmName.SHA512); 41public static RSAEncryptionPadding OaepSHA3_256 { get; } = CreateOaep(HashAlgorithmName.SHA3_256); 46public static RSAEncryptionPadding OaepSHA3_384 { get; } = CreateOaep(HashAlgorithmName.SHA3_384); 51public static RSAEncryptionPadding OaepSHA3_512 { get; } = CreateOaep(HashAlgorithmName.SHA3_512); 66public static RSAEncryptionPadding CreateOaep(HashAlgorithmName hashAlgorithm) 105return Equals(obj as RSAEncryptionPadding); 108public bool Equals([NotNullWhen(true)] RSAEncryptionPadding? other) 115public static bool operator ==(RSAEncryptionPadding? left, RSAEncryptionPadding? right) 125public static bool operator !=(RSAEncryptionPadding? left, RSAEncryptionPadding? right)
System\Security\Cryptography\RSAOAEPKeyExchangeDeformatter.cs (1)
29return _rsaKey.Decrypt(rgbData, RSAEncryptionPadding.OaepSHA1);
System\Security\Cryptography\RSAOAEPKeyExchangeFormatter.cs (1)
72return _rsaKey.Encrypt(rgbData, RSAEncryptionPadding.OaepSHA1);
System\Security\Cryptography\RSAPKCS1KeyExchangeDeformatter.cs (1)
39return _rsaKey.Decrypt(rgbIn, RSAEncryptionPadding.Pkcs1);
System\Security\Cryptography\RSAPKCS1KeyExchangeFormatter.cs (1)
53return _rsaKey.Encrypt(rgbData, RSAEncryptionPadding.Pkcs1);
System.Security.Cryptography.Algorithms (1)
System.Security.Cryptography.Algorithms.cs (1)
39[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAEncryptionPadding))]
System.Security.Cryptography.Pkcs (26)
Internal\Cryptography\Pal\AnyOS\ManagedPal.KeyTrans.cs (10)
72RSAEncryptionPadding? encryptionPadding; 77encryptionPadding = RSAEncryptionPadding.Pkcs1; 140RSAEncryptionPadding padding = recipient.RSAEncryptionPadding ?? RSAEncryptionPadding.Pkcs1; 142if (padding == RSAEncryptionPadding.Pkcs1) 147else if (padding == RSAEncryptionPadding.OaepSHA1) 152else if (padding == RSAEncryptionPadding.OaepSHA256) 157else if (padding == RSAEncryptionPadding.OaepSHA384) 162else if (padding == RSAEncryptionPadding.OaepSHA512) 183RSAEncryptionPadding encryptionPadding,
Internal\Cryptography\Pal\Windows\PkcsPalWindows.Encrypt.cs (8)
262RSAEncryptionPadding? padding = recipient.RSAEncryptionPadding; 272padding = RSAEncryptionPadding.OaepSHA1; 281padding = RSAEncryptionPadding.Pkcs1; 285if (padding == RSAEncryptionPadding.Pkcs1) 291else if (padding == RSAEncryptionPadding.OaepSHA1) 297else if (padding == RSAEncryptionPadding.OaepSHA256) 303else if (padding == RSAEncryptionPadding.OaepSHA384) 309else if (padding == RSAEncryptionPadding.OaepSHA512)
Internal\Cryptography\PkcsHelpers.cs (5)
339[NotNullWhen(true)] out RSAEncryptionPadding? rsaEncryptionPadding, 384rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA1; 387rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA256; 390rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA384; 393rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA512;
System\Security\Cryptography\Pkcs\CmsRecipient.cs (3)
22CmsRecipient(X509Certificate2 certificate, RSAEncryptionPadding rsaEncryptionPadding) 36CmsRecipient(SubjectIdentifierType recipientIdentifierType, X509Certificate2 certificate, RSAEncryptionPadding rsaEncryptionPadding) 71RSAEncryptionPadding? RSAEncryptionPadding { get; }