Encrypts or decrypts a file using the security middleware and user credentials.
enc_dec_file --appserver_url URL --input_file read_file --output_file write_file --operation [encrypt | decrypt] --username user_name --password sm_password [--init_ctx_factory initialCtxtFactory]
Argument |
Datatype |
Default value |
Description |
---|---|---|---|
* appserver_url |
string |
The URL to use when connecting to the security middleware. |
|
* input_file |
string |
The name of the file to encrypt or decrypt; must be a readable file. |
|
* output_file |
string |
The destination file for the encrypted or decrypted data; must be a writable file. |
|
* operation |
choice |
The operation to perform, encrypt or decrypt. |
|
* username |
string |
The user name for connecting to the security middleware. |
|
* password |
string |
The password for connecting to the security middleware. |
|
init_ctx_factory |
string |
com.sybase.ep.security.naming. InitialContextFactory |
The InitialContextFactory to use when connecting to the security middleware. |
Return value |
Indicates |
---|---|
0 |
The command ran successfully; the result is true/success. |
1 |
The command failed. |
This example encrypts the input file myFile.txt and writes the output to the myFile.txt.enk file; the user name is “pso” and the password is “pso”:
securetool enk_dec_file --appserver_url iiop://victory:9000 --operation encrypt --username pso --password pso --input_file myFile.txt --output_file myFile.txt.enk