Content deleted Content added
Gcnaccount (talk | contribs) Initial page creation |
Gcnaccount (talk | contribs) No edit summary |
||
Line 93:
return ''.join([chr((integer >> (8 * i)) & 0xFF) for i in reversed(range(size))])
def mgf1(input, length,
counter = 0
output = ''
while (len(output) < length):
C = i2osp(counter, 4)
output +=
counter += 1
return output[:length]
Line 112:
>>> from binascii import hexlify
>>> from hashlib import sha256
>>>
'1ac907'
>>>
'1ac9075cd4'
>>>
'bc0c655e01'
>>>
'bc0c655e016bc2931d85a2e675181adcef7f581f76df2739da74faac41627be2f7f415c89e983fd0ce80ced9878641cb4876'
>>>
'382576a7841021cc28fc4c0948753fb8312090cea942ea4c4e735d10dc724b155f9f6069f289d61daca0cb814502ef04eae1'
</source>
|