securityUtility encode
The securityUtility encode
command supports plain text obfuscation for Open Liberty.
This command obfuscates text that you provide, such as a password, based on the type that is specified. If no text is provided, the command enters interactive mode. Interactive mode prompts you to enter and confirm your text input, rather than provide text on the same line as the command. Text with spaces must be put in quotation marks. For more information about limits to password encryption, see Password encryption limitations.
Usage examples
Encrypt a password with Advanced Encryption Standard (AES) encryption. After you enter this command, interactive mode prompts you for the password that you want to encrypt:
securityUtility encode --encoding=aes
Hash a password. After you enter this command, interactive mode prompts you for the password that you want to hash:
securityUtility encode --encoding=hash
Options
Option | Description |
---|---|
--encoding=encoding_type | Specifies how to encode the password. Supported encodings types are |
--key=encryption_key | Specifies the key to use when you encode with AES encryption. This string is hashed to produce an encryption key that is used to encrypt and decrypt the password. You can provide the key by defining the |
--listCustom | Displays the information of the custom password encryption in JSON format. The information consists of the following things:
|
--notrim | Specifies whether space characters are removed from the beginning and end of the specified text. If this option is specified, the provided text is encoded as it is. If this option isn’t specified, space characters are removed from the beginning and end of the specified text. |
Exit codes
The following exit codes are available for the securityUtility encode
command:
Code | Explanation |
---|---|
0 | This code indicates successful completion of the requested operation. |
1 | This code indicates a generic error. |
2 | This code indicates that the server is not found. |
3 | This code indicates that the client is not found. |
4 | This code indicates that the path can not be created. |
5 | This code indicates that the file already exists. |