rijndael encryption and decryption on windows command Line or powershell

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?

Macdanorld

Posted 2020-02-18T17:56:36.437

Reputation: 11

Answers

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.

MicroservicesOnDDD

Posted 2020-02-18T17:56:36.437

Reputation: 77

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 – 2020-02-19T16:03:20.057

@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. – MicroservicesOnDDD – 2020-02-19T16:58:31.953

1It 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 – 2020-02-20T02:32:35.810