1

Please I am trying to encrypt a file on windows command line using Rijndael cipher without a third party application like Openssl. I have been on this for a while now but seems not to be getting the right syntax. Can anyone help me with the windows command line syntax for this?

1 Answer 1

0

Here is an example that should work for you: "Rijndael Encryption and Decryption in C# and Powershell". The first example is PowerShell, which is what you wanted. You just have to split the code into an Rijndael_encrypt.ps1 file and a Rijndael_decrypt.ps1 file and adapt them to using the incoming command-line arguments.

3
  • The link is talking about writing scripts to do that. What i am looking for is a windows command line syntax used in encrypting and decrypting files showing the parameters needed e.g file to encrypt/decrypt, key to use, and maybe the name to call the encrypted file in the right order. i dont know if this makes sense
    – Macdanorld
    Commented Feb 19, 2020 at 16:03
  • @Macdanorld -- What you are asking makes sense, but I don't know of any such utility. And to me it's not terribly different to write a script for the windows command line or a script for the PowerShell command line -- if they give you the source code, you just paste it in and make it work. And you should be able to call that PowerShell script from the windows command line, which accomplishes what you want, I think. Oh, yes. And please consider upvoting my answer a click, if it was reasonable and not way off base (useless). Thank you. Commented Feb 19, 2020 at 16:58
  • 1
    It does not exist (not natively in Windows proper anywhere), hence the pointer to the script is prudent. Since you posted this to a PowerShell Q&A as in your title. So, this is really off-topic for a Powershell Q&A if that is not what you wanted. You can tweak what that resource provides, yourself or whatever, add params, etc., then turn it into an exe and have at it.
    – postanote
    Commented Feb 20, 2020 at 2:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .