Questions tagged [securestring]

Represents text that should be kept confidential. The text is encrypted for privacy when being used, and deleted from computer memory when no longer needed

SecureString object is similar to a String object in that it has a text value. However, the value of a SecureString object is automatically encrypted, can be modified until the application marks it as read-only, and can be deleted from computer memory by either the application or the .NET Framework garbage collector.

224 questions
0
votes
2 answers

Using System.Security.SecureString in .NET Remoting App?

I am developing a Remoting application where a client looks up store specific information to login to a web server. It sets the user name and passwords in a class that stores the properties as System.Security.SecureString. I then try to pass the…
jac
  • 9,666
  • 2
  • 34
  • 63
0
votes
2 answers

Oracle DB and SecureString

I am currently storing the user password in a SecureString. Which is also kept around in case the connection to the DB resets. My problem is, I'm trying to pass this password to an OracleParamater, but I'm not sure if it supports it or not. Does…
Phyx
  • 2,697
  • 1
  • 20
  • 35
0
votes
0 answers

Hide credentials on powershell Scripts for Linux

We have hybrid environments (Windows + Ubuntu) and multiple scripts to monitor the systems via Zabbix. All the scripts work well in Windows + Ubuntu via powershell but I´m facing the following issue and I don´t have clear even if it´s possible to…
Eddy
  • 33
  • 4
0
votes
0 answers

How to decode an encrypted standard string

I'm transforming a string into an encrypted standard string in PowerShell, then I'd like to use C# to retrieve this encrypted standard string and transform it back into a plain string, in order to use it as a password. Thank you for your…
0
votes
0 answers

MAUI and enrty as IsPassword security. Is it enough to binding it to a string property of the view model?

I have a login page and for the password, the unique option it is to use an entry with the parameter IsPassword as true. But it is still a string, so in my view model I can't use SecureString for the binding, I have to use a string, that is a plain…
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
0
votes
0 answers

C# can't use variable value due to SecureString type

Tell me, in the program it is necessary to use the password of one of the users to start the program, but when I use the value of the variable with the password, the following error occurs: cannot convert from string to…
COBAuKOT
  • 1
  • 1
0
votes
1 answer

Password from Key and Hash

I am trying to get the key this key for an assignment I was provided with the key and hash. In PowerShell how do I convert this to plain text. Any guidance is appreciated. I have tried these PS C:\test> $PlainPassword = Get-Content…
AliONE
  • 11
0
votes
0 answers

How can I get a C# console application to return a securestring as output to a powershell console

I need to build a C# console application that will allow me to pass in a string, convert it to a secure string, and pass it out to PowerShell The reason for this is that we have PowerShell event logging enabled in our environment. When you use the…
0
votes
0 answers

I want to store encrypted credentials and use them to open a powershell instance and run a script that makes a change to a field in AD

Below is my code, I've used the same process for connecting to sftp securely. I'm getting the error at the bottom of my post. Not sure if I'm missing a step in the creation of the key and password. Thanks. #Set the credentials $Password =…
M3KVII
  • 1
  • 1
0
votes
0 answers

Utilization of Marshal.PtrToStringAuto in combination with Marshal.SecureStringToBSTR

We have an old legacy app and I'm trying to understand the purpose of this code: string password = "PLAIN_TEXT_PASSWORD"; foreach (char c in password) securePassword.AppendChar(c); string btsr =…
S. Walker
  • 2,129
  • 12
  • 30
0
votes
0 answers

Convert `System.Security.SecureString` to Base64String

I have a credential that is stored in a CLIXML file that I need to use to access a REST API. The API requires the credential to sent in Base64. Is there an simple way of converting the System.Security.SecureString password object of the CLIXML…
g2gsr
  • 43
  • 7
0
votes
1 answer

The most secure way for an .net desktop application connect to oracle database

I have a Windows Form Desktop Application that uses odp.net to connect to an Oracle Database. The app has multiple users connecting to the same schema (the schema store a table of users for the app). The app is installed on every client machine,…
fsbflavio
  • 664
  • 10
  • 22
0
votes
0 answers

What is a right way to restore secured string from text file via Powershell

I would like to avoid using password in plain text via using cmdkey and simpliest way to achieve that, from my point of view, is to copy coded string to a text grabbed from ConvertTo-SecureString and save is to txt file and then import this back…
Dmitry Dorofeev
  • 85
  • 1
  • 1
  • 13
0
votes
1 answer

How to handle Veracode error for MVC's Model's property for a password field?

I have a model for login logic. It contains a property called Password: [Required(ErrorMessage = " ")] [DataType(DataType.Password)] public string Password { get; set; } When Veracode scans the model it produces the following error: CWE-316:…
gene
  • 2,098
  • 7
  • 40
  • 98
0
votes
1 answer

Powershell - Can't unlock BitLocker as 256 characters long password contains special characters with single double quotes

Here's the background and I have no clue beyond this so tell me how to move ahead from this! PS C:\> $SecureString = ConvertTo-SecureString "fjuksAS1337" -AsPlainText -Force PS C:\> Unlock-BitLocker -MountPoint "E:" -Password $SecureString My…