Sergidev commited on
Commit
a99a6f1
·
verified ·
1 Parent(s): 5b85603

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -82,7 +82,7 @@ def encrypt_file(filepath, factor):
82
  checksum = calculate_checksum(data)
83
 
84
  # Convert data to audio samples
85
- samples = [ord(byte) * factor for byte in data.decode('latin-1')]
86
 
87
  # Add checksum to the beginning of the samples
88
  checksum_samples = [ord(byte) for byte in checksum.encode('ascii')]
 
82
  checksum = calculate_checksum(data)
83
 
84
  # Convert data to audio samples
85
+ samples = [int(byte * factor) for byte in data]
86
 
87
  # Add checksum to the beginning of the samples
88
  checksum_samples = [ord(byte) for byte in checksum.encode('ascii')]