encryptpassword

usage: encryptpassword [[<password>] | [-a|-alias <alias> [<password> | -e <encryptedpassword>]]]

Encrypts a password and prints out the result. Use this command to create an encryption of a password.

When you run encryptpassword in non-interactive mode, special shell characters must be escaped or the password may become truncated. You can use backslash (\) to escape a special character.

Example - Escaping special character

$ mzsh encryptpassword example\$password 

You can escape all special characters in a string by surrounding it with single quotes (').

Example - Escaping all characters in a string

$ mzsh encryptpassword '`examplepassword!#$&()|\";'<> '


If single quote characters are part of the password, these can be escaped with backslash (\).

Example - Escaping single quote characters

$ mzsh encryptpassword '&example#'\'password

Hint!

 You can use the encrypted password as a password value in an external reference or in a password cell of a workflow table.

Options

The command accepts the following options:

OptionDescription
[<password>]The password you want to encrypt.
[-a|-alias]

Use this option to encrypt a password with an alias.

Note!

In order to use this option, an alias must have been generated with the Java keytool.

When this option is not used, the system default key will be used.If you want to use this option, the path and password to the keystore has to be indicated by setting the Platform properties mz.cryptoservice.keystore.path and mz.cryptoservice.keystore.password. The keystore must also contain keys for all the aliases you want to use. For further information about these properties, see /wiki/spaces/MD82/pages/3785846 in the /wiki/spaces/MD82/pages/3778529.

[-e]Use this option to encrypt a password with another alias.

Note!

The Platform has to be started, and you have to log in to be able to use the -a and -e options.

Return Codes

Listed below are the different return codes for the encryptpassword command:

CodeDescription
0Will be returned if the command was successful.
1Will be returned if the argument count is incorrect.
3Will be returned if the encryption went wrong.