Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleExample for Encryption using Windows Shell
linenumberstrue
call .\bin\js7_encrypt.cmd "--cert=agent.crt" "--in=secret"
@echo %JS7_ENCRYPT_VALUE%
 
@rem encrypts the given secret using an Agent's X.509 certificate
@rem consider that for Windows Shell all arguments have to be quoted
@rem output is provided from an environment variable that includes the symmetric key, initialization vector and encrypted string separated by space

Encrypting and forwarding Secret using Windows Shell in Jobs

Code Block
titleExample for Encryption using Windows Shell
linenumberstrue
call .\bin\js7_encrypt.cmd "--cert=agent.crt" "--in=secret"
@echo result=%JS7_ENCRYPT_VALUE% >> %JS7_RETURN_VALUES
 
@rem encrypts the given secret using an Agent's X.509 certificate
@rem consider that for Windows Shell all arguments have to be quoted
@rem output is provided from an environment variable that includes the symmetric key, initialization vector and encrypted string separated by space

Encrypting File using Windows Shell

Code Block
titleExample for Encryption using Windows Shell
linenumberstrue
echo secret file > %TEMP%\secret.txt
call .\bin\js7_encrypt.cmd "--cert=agent.crt" "--infile=%TEMP%\secret.txt" "--outfile=%TEMP%\secret.txt.encrypted"
@echo %JS7_ENCRYPT_VALUE%

@rem encrypts the given file using an Agent's X.509 certificate
@rem consider that for Windows Shell all arguments have to be quoted
@rem output is available from the JS7_ENCRYPT_VALUE environment variable
@rem output includes the symmetric key, initialization vector and encrypted file separated by space

...