(data)
| 108 | # $env:path = $env:path + ";C:\Program Files\OpenSSL-Win64\bin" |
| 109 | |
| 110 | def run_encrypt(data): |
| 111 | env = os.environ.copy() |
| 112 | env["password"] = "zf7ShyBhZOraQDdE/FiZpm/m/8f9X+M1" |
| 113 | proc = subprocess.Popen( |
| 114 | ["openssl", "enc", "-des3", "-pbkdf2", "-pass", "env:password"], |
| 115 | env=env, |
| 116 | stdin=subprocess.PIPE, |
| 117 | stdout=subprocess.PIPE, |
| 118 | ) |
| 119 | proc.stdin.write(data) |
| 120 | proc.stdin.flush() # Ensure that the child gets input |
| 121 | return proc |
| 122 | |
| 123 | |
| 124 | print("Example 6") |