Content deleted Content added
m →Example code: note it's python2 code (ie not python3) |
→Example code: update to python 3.10 |
||
Line 66:
def i2osp(integer: int, size: int = 4) -> str:
return b"".join([chr((integer >> (8 * i)) & 0xFF).encode() for i in reversed(range(size))])
def mgf1(input_str:
"""Mask generation function."""
counter = 0
output = b""
while len(output) < length:
C = i2osp(counter, 4)
output +=
counter += 1
return output[:length]
|