• R/O
  • HTTP
  • SSH
  • HTTPS

pybtm: 提交

Python3 implementation of the Bytom protocol. https://pypi.org/project/pybtm/


Commit MetaInfo

修订版95152936414b2e138d74ad05ff2e12c244507e1a (tree)
时间2019-03-25 18:03:27
作者Chengcheng Zhang <943420582@qq.c...>
CommiterChengcheng Zhang

Log Message

add get_entropy

更改概述

差异

--- a/README.md
+++ b/README.md
@@ -1,3 +1,16 @@
1-# pybtm
1+pybtm
2+======
3+
4+- [1 Installation](#1-installation)
5+- [2 Usage](#2-usage)
26
37 Python3 implementation of the Bytom protocol.
8+
9+## 1 Installation
10+
11+```
12+$ pip install pybtm
13+```
14+
15+## 2 Usage
16+
--- a/pybtm/__init__.py
+++ b/pybtm/__init__.py
@@ -1 +1,2 @@
1-name = "pybtm"
\ No newline at end of file
1+name = "pybtm"
2+version = "0.0.2"
\ No newline at end of file
--- /dev/null
+++ b/pybtm/key.py
@@ -0,0 +1,6 @@
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
\ No newline at end of file
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
55
66 setuptools.setup(
77 name="pybtm",
8- version="0.0.1",
8+ version="0.0.2",
99 author="zcc0721",
1010 author_email="zcc0721@foxmail.com",
1111 description="Python3 implementation of the Bytom protocol.",
Show on old repository browser