I'm rewriting an AutoIt script in PowerShell. A file on a share is generated daily (pw.jpg
) by an AutoIt executable using:
_Crypt_EncryptFile(pw.txt, pw.jpg, "passphrase", algo)
AutoIt documentation references MSDN, I found identically named functions here. The password is decrypted using:
_Crypt_DecryptFile(pw.jpg, pw.txt, "passphrase", algo)
Algorithm is $CALG_AES_256
(maps to 0x00006610
). How can I decrypt it using PowerShell? Anything I could find assumes encrypting and decrypting with same PowerShell functions only.