# Using Cypher Keys in Scripts

To use a Cypher key in a script, use the following syntax:

`<%=cypher.read('var_name')%>`

Example: `PASSWORD=<%=cypher.read('secret/myuserpassword')%>`

Cypher also includes an option to read a value from the `password/*` mountpoint or create one if it doesn’t already exist. Use the following syntax:

`<%=cypher.readPassword('var_name')%>`

Example: `` PASSWORD=<%=cypher.readPassword('myuserpassword')%>` ``

It should be noted that when Cypher keys are created using the `readPassword` function, the subsequent reads can only come from the same user. If another VM Essentials user attempts to run the automation script containing the `readPassword` call, the secret value will not be read and it’s very likely the script will fail. For Tasks that need to be run by multiple users, use a pre-existing Cypher key and reference it back in the script using `read` rather than `readPassword`.
