Content deleted Content added
→Example code: code style Black |
m change source to syntaxhighlight |
||
Line 62:
Below is Python code implementing MGF1:
<
import hashlib
Line 77:
counter += 1
return output[:length]
</syntaxhighlight>
Example outputs of MGF1:
<
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Line 98:
>>> hexlify(mgf1('bar', 50, sha256))
'382576a7841021cc28fc4c0948753fb8312090cea942ea4c4e735d10dc724b155f9f6069f289d61daca0cb814502ef04eae1'
</syntaxhighlight>
== References ==
|