OSDN Git Service
(root)
/
bytom
/
pybtm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add get_entropy
[bytom/pybtm.git]
/
pybtm
/
key.py
1
import random
2
3
def get_entropy():
4
entropy = random.randint(0, 2**128)
5
entropy_hexstr = entropy.to_bytes(16, byteorder='big').hex()
6
return entropy_hexstr