setSecret
Description
setSecret(
adds a secret with the
specified name to your MATLAB® vault, which is accessible only from the exact combination of your operating
system account and local machine.secretname
)
Your vault and secrets, which do not leave your local machine, persist across MATLAB sessions. Each secret consists of a name, value, and optional metadata.
Secret name – A unique case-sensitive text identifier for the secret. The secret name is stored unencrypted in your vault as a string scalar.
Secret value – A text value associated with the secret. The Secret Prompt dialog box, where you enter the secret value, supports copy-paste functionality. The secret value is stored encrypted in your vault using industry standard AES-256 encryption. The secret value is returned as a string scalar.
Secret metadata – A dictionary containing additional information associated with the secret. The optional secret metadata is stored unencrypted in your vault.
For increased security when you use MATLAB Online™, enable two-step verification for your MathWorks® Account.
setSecret(
specifies whether to overwrite an existing secret value in the vault.secretname
,Overwrite=tf
)
Examples
Input Arguments
Version History
Introduced in R2024aSee Also
getSecret
| isSecret
| listSecrets
| removeSecret
| setSecretMetadata
| getSecretMetadata