Skip to content

StoreSecureString.cs

Avrigeanu Laurian edited this page Apr 14, 2023 · 1 revision

StoreSecureString(name:type) : void

Parameters

  • name (string): The name to store the secure string under.
  • value (SecureString): The secure string to be stored.

Returns

  • void: This method does not return any value.

Remarks

  • This method encrypts the given SecureString object using the ProtectedData class, and stores the resulting encrypted byte array in a MySQL database table named assets. The name of the secure string is also stored in the table for later retrieval.
  • If an entry with the same name already exists in the table, an exception will be thrown with the message "Entry with the same Name already exists."
  • The Connection property of the Orchestrator class should be set prior to calling this method.
  • After calling this method, the SecureString object passed as a parameter should be disposed of to clear its contents from memory.
Clone this wiki locally