Questions tagged [system.security]
59 questions
37
votes
5 answers
PowerShell - Decode System.Security.SecureString to readable password
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,…

LaPhi
- 5,675
- 21
- 56
- 78
35
votes
2 answers
PowerShell - Get-Credential decode password?
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 =…

LaPhi
- 5,675
- 21
- 56
- 78
8
votes
2 answers
SSRS check if user in group using Custom Assembly
I have created a Custom Assembly for my SSRS Project.
The Custom Assembly has got 2 functions, IsInGroup and MyTest:
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Principal;
namespace…

JsonStatham
- 9,770
- 27
- 100
- 181
5
votes
1 answer
xamarin: Failed to resolve assembly: System.Security
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…

user701700
- 75
- 1
- 7
5
votes
1 answer
RSA Encryption returning different output
I'm new to RSA encryption and I've been trying to learn how exactly it works using .Net's System.Security.Cryptography.
public String Encryption(Byte[] Input, RSAParameters PublicKey)
{
RSAC = new RSACryptoServiceProvider();
…

Transcendent
- 5,598
- 4
- 24
- 47
5
votes
1 answer
Token-Based Authentication in WCF
I am creating a website which will contain both ASP.NET pages and a Flash applet. I want to encapsulate my business logic in a WCF service which will be exposed through two endpoints: One accesssible over the Internet through HTTP(S), for use by…

Aaron
- 2,013
- 16
- 22
3
votes
1 answer
How can you generate OTP with system.security.cryptography that can be authenticated on client?
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…

pghcpa
- 833
- 11
- 25
3
votes
4 answers
ASP.NET WebPermission Security Exception
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…

Skittles
- 897
- 1
- 15
- 24
3
votes
1 answer
add security groups to folder issue / System.Security.Principal.IdentityNotMappedException:
I am struggling with strange issue and I wonder if some one can help me please.
At some point of my program I like to add security groups with appropriate permissions to folder. Steps look like that.
Create Folder
Create Domain Local Security…

J.Pruchnik
- 41
- 1
- 7
3
votes
1 answer
Key not valid Error in One Project But Works In Different Project From Same Solution
I have a C# solution that uses System.Security to decrypt the password to a TFS server. The security routines are kept in a separate project within the solution. There are two other projects in the solution that use the module to decrypt this…

user2593308
- 31
- 1
2
votes
0 answers
Get same encrypted string from System.Security.Cryptography
I want to make change in below encryption code so it gives me same encrypted string for a given text again and again.
e.g input string : "test"
output encrypted string : "@#$#@$@#$SDFDSF"
If I input "test" again and again output should be…

Var
- 217
- 5
- 16
2
votes
1 answer
Transforming a password to a 256-bit key
I have a file encrypted with AES using a 256-bit (or 128-bit) key. Passing to and asking the file owner to keep the 256-bit key would be humanly difficult.
How can a more friendly password be used by the owner to remember or retrieve the actual…

Old Geezer
- 14,854
- 31
- 111
- 198
2
votes
1 answer
Could not load file or assembly 'System.Security.Cryptography.Xml
I have class library project in .net standard 2.0.3 where I'm using System.Security.Cryptography.Xml to sign a xml document with a privateRSAkey.
var sign = GetXmlSign(doc, rsa);
private static XmlElement GetXmlSign(XmlDocument xml,…

Sabir Hossain
- 1,183
- 1
- 25
- 46
2
votes
1 answer
List all the Claim types stored in the System.Security.Claims.ClaimTypes in C#
Working with Asp.Net Identity allow you to add the claims to a user. And the System.Security.Claims.ClaimTypes allows you to select any ClaimType from various ClaimTypes.
ClaimTypes is a static class and defines constants for well-known claim types…

Junaid Sultan
- 343
- 1
- 5
- 17
2
votes
1 answer
Why is System.Security.Cryptography.Xml not part of .NET Standard 2.0?
I am a little confused by the fact that almost all types from the namespace System.Security.Cryptography are part of .NET Standard 2.0, but for System.Security.Cryptography.Xml one needs to take a dependency on the extension package by the same…

Valo
- 1,872
- 2
- 15
- 23