system.security

Generate and Sign Certificate Request using pure .net Framework

余生颓废 提交于 2020-01-08 21:18:58
问题 I am trying to use pure .net code to create a certificate request and create a certificate from the certificate request against an existing CA certificate I have available (either in the Windows Certificate store or as a separate file). I know that I have the classes X509Certificate and X509Certificate2 available to load certificates and get access to their information, but I don't see any classes or functionality within the System.Security.Cryptography namespace that could be used to create

Generate and Sign Certificate Request using pure .net Framework

て烟熏妆下的殇ゞ 提交于 2020-01-08 21:18:06
问题 I am trying to use pure .net code to create a certificate request and create a certificate from the certificate request against an existing CA certificate I have available (either in the Windows Certificate store or as a separate file). I know that I have the classes X509Certificate and X509Certificate2 available to load certificates and get access to their information, but I don't see any classes or functionality within the System.Security.Cryptography namespace that could be used to create

Is there a limit for RSA key exponents in .NET?

有些话、适合烂在心里 提交于 2019-12-18 07:14:19
问题 Using C# I cannot import a public RSA key with an exponent of {1, 0, 0, 0, 15}: There is an exception: System.Security.Cryptography.CryptographicException was caught HResult=-2146893819 Message=Bad Data. Source=mscorlib StackTrace: at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) at System.Security.Cryptography.Utils._ImportKey(SafeProvHandle hCSP, Int32 keyNumber, CspProviderFlags flags, Object cspObject, SafeKeyHandle& hKey) at System.Security

PowerShell - Decode System.Security.SecureString to readable password

℡╲_俬逩灬. 提交于 2019-12-17 06:46:11
问题 I want to decode the password from a System.Security.SecureString to a readable password. $password = convertto-securestring "TestPassword" -asplaintext -force $credentials = New-Object System.Net.NetworkCredential("TestUsername", $password, "TestDomain") This code part works fine, I can use the $credentials object. But later in my code I need the password in a readable format. Because a methode needs the password in readable string. So I must decode the password back. How it is possible to

xamarin: Failed to resolve assembly: System.Security

一世执手 提交于 2019-12-10 14:36:04
问题 When I try to deploy the iOS application I get the following error: error MT2002: Failed to resolve assembly: 'System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' The project has no other references than those that come in the HelloWorld app (monotouch, System, System.Core and System.Xml) The build is always successful. How do I solve this? 回答1: System.Security.dll is not an assembly that Xamarin.iOS ships. The version number is not correct either. This

PowerShell - Get-Credential decode password?

我怕爱的太早我们不能终老 提交于 2019-12-09 14:00:50
问题 I want to use the Get-Credential cmdlet in my code. How is is possible to decode the password easily back from the System.Security.SecureString format? (I must use the password in clear text format at one part in my code) $credential = Get-Credential $credential.Password | ConvertFrom-SecureString $credential #How to show password in text format? My workaround, but I think there is also a normal way $credCachePS = New-Object System.Net.CredentialCache $credCachePS.Add("uridummy", "NTLM",

How can you generate OTP with system.security.cryptography that can be authenticated on client?

不想你离开。 提交于 2019-12-06 12:11:44
问题 Anyone know where I could find sample code for this with system.security.cryptography namespace -- or instructions followable by a developer? The purpose is to add two-factor authentication to an asp.net website. On website I want to ask user to enter a passcode (similar to if they got it from a keyfob). On the client side I want to provide a vb.net windows.forms program that generates the correct passcode. I want to do this with system.security.cryptography namespace on a small scale. I was

How can you generate OTP with system.security.cryptography that can be authenticated on client?

↘锁芯ラ 提交于 2019-12-04 16:53:08
Anyone know where I could find sample code for this with system.security.cryptography namespace -- or instructions followable by a developer? The purpose is to add two-factor authentication to an asp.net website. On website I want to ask user to enter a passcode (similar to if they got it from a keyfob). On the client side I want to provide a vb.net windows.forms program that generates the correct passcode. I want to do this with system.security.cryptography namespace on a small scale. I was looking for sample code I don't want to mess with devices or purchase authentication server appliances.

PowerShell - Get-Credential decode password?

巧了我就是萌 提交于 2019-12-03 22:09:29
I want to use the Get-Credential cmdlet in my code. How is is possible to decode the password easily back from the System.Security.SecureString format? (I must use the password in clear text format at one part in my code) $credential = Get-Credential $credential.Password | ConvertFrom-SecureString $credential #How to show password in text format? My workaround, but I think there is also a normal way $credCachePS = New-Object System.Net.CredentialCache $credCachePS.Add("uridummy", "NTLM", $credential) $credCachePS | select Password This is what I use ( though this makes it insecure, but I think

ASP.NET WebPermission Security Exception

帅比萌擦擦* 提交于 2019-12-03 21:27:58
问题 I usually hate posting these types of questions as normally I find that the best way to really learn is to figure out the answer yourself. However, I need an answer to this question really quickly as I have a client who can't run her business due to this problem. Yesterday my ASP.NET host provider moved my application from a server running .NET 1.1 to one running .NET 1.1 and 2.0. My problem is that when I test the move the main site page (Default.aspx) will not load "Description: The