5 # Mix random data, compressing low-entropy into high-entropy
17 ratio
= float(sys
.argv
[1])
19 hash_size
= len(hash("").digest())
20 bytes_to_read
= int(math
.floor(hash_size
* ratio
))
23 input = sys
.stdin
.read(bytes_to_read
)
26 output
= hash(input).digest()
27 sys
.stdout
.write(output
)
28 if len(input) < bytes_to_read
: