File tree Expand file tree Collapse file tree 2 files changed +2
-40
lines changed Expand file tree Collapse file tree 2 files changed +2
-40
lines changed Original file line number Diff line number Diff line change @@ -105,26 +105,7 @@ jobs:
105105 f.write(encrypted)
106106 print(f"Encrypted: {len(data)} bytes")
107107 EOF
108- python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" '
109- import sys
110- key = sys.argv[1]
111- input_file = sys.argv[2]
112- output_file = sys.argv[3]
113-
114- with open(input_file, 'rb') as f :
115- data = f.read()
116-
117- key_bytes = key.encode('utf-8')
118- encrypted = bytearray(len(data))
119- for i in range(len(data)) :
120- encrypted[i] = data[i] ^ key_bytes[i % len(key_bytes)]
121-
122- with open(output_file, 'wb') as f :
123- f.write(encrypted)
124-
125- print(f"Encrypted : {len(data)} bytes")
126- PYTHON_SCRIPT
127- python3 - "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc"
108+ python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc"
128109
129110 # Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js)
130111 cd /tmp/searchindex-repo
Original file line number Diff line number Diff line change @@ -201,26 +201,7 @@ jobs:
201201 f.write(encrypted)
202202 print(f"Encrypted: {len(data)} bytes")
203203 EOF
204- python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" '
205- import sys
206- key = sys.argv[1]
207- input_file = sys.argv[2]
208- output_file = sys.argv[3]
209-
210- with open(input_file, 'rb') as f :
211- data = f.read()
212-
213- key_bytes = key.encode('utf-8')
214- encrypted = bytearray(len(data))
215- for i in range(len(data)) :
216- encrypted[i] = data[i] ^ key_bytes[i % len(key_bytes)]
217-
218- with open(output_file, 'wb') as f :
219- f.write(encrypted)
220-
221- print(f"Encrypted : {len(data)} bytes")
222- PYTHON_SCRIPT
223- python3 - "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc"
204+ python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc"
224205
225206 # Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js)
226207 cp "${ASSET}.gz.enc" "/tmp/searchindex-repo/${FILENAME}.gz"
You can’t perform that action at this time.
0 commit comments