Versions Compared

Key

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

...

  • Users can create a Certificate Signing Request (CSR) and ask their Certificate Authority (CA) to sign the CSR and to receive an X.509 Certificate. The Private Key or X.509 Certificate allow to derive the Public Key.
  • User can create a self-signed X.509 Certificate, see JS7 - How to create self-signed X.509 SSL TLS Certificates.
  • Users can create a Private Key and Certificate as explained in the next chapter.

...

Code Block
languagepowershell
titleExample for Encryption using PowerShell
linenumberstrue
$result = Invoke-JS7Encrypt -CertificatePath agent.crt -Value "secret" -JavaLib /js7/js7.encryption/lib
"new_var=$result" | Out-File $env:JS7_RETURN_VALUES -Append

# encrypts the given secret using an Agent's X.509 certificate
# output includes the encrypted symmetric key, initialization vector and encrypted secret separated by spaces
# output is stored to the "new_var" variable (key/value pair) that is made available for later jobs in the workflow
# for PowerShell version 5.x users have to add the -Encoding OEM option to the Out-File cmdlet

Encrypting File using PowerShell

...