Skip to content

Commit

Permalink
encrypt_slack_nicks.py: make more robust if there are numbers only
Browse files Browse the repository at this point in the history
  • Loading branch information
schuellerf authored and ochosi committed Jan 8, 2024
1 parent b21a5b5 commit 3e0e5b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions encrypt_slack_nicks.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def encrypt_values(data, key):
encrypted_data = {}

for k, v in data.items():
encrypted_value = cipher_suite.encrypt(v.encode()).decode('utf-8')
encrypted_value = cipher_suite.encrypt(f"{v}".encode()).decode('utf-8')
encrypted_data[k] = encrypted_value

return encrypted_data
Expand All @@ -33,7 +33,7 @@ def decrypt_values(data, key):
decrypted_data = {}

for k, v in data.items():
decrypted_value = cipher_suite.decrypt(v.encode()).decode('utf-8')
decrypted_value = cipher_suite.decrypt(f"{v}".encode()).decode('utf-8')
decrypted_data[k] = decrypted_value

return decrypted_data
Expand Down

0 comments on commit 3e0e5b3

Please sign in to comment.