访问NIST随机信标的Python3库

nistbeacon的Python项目详细描述


python nist随机信标

警告:不要将信标生成的值用作机密加密 按键。

安装

先决条件

所需的库pycryptodomenistbeacon一起使用。

ubuntu和其他基于linux的用户应该安装python3-dev

apt-get install python3-dev

安装nistbeacon

要安装信标库,只需使用pip

pip install nistbeacon

信标用法

使用信标很容易。大多数查询都是通过 NistBeacon它生成NistBeaconValue对象。

信标样本代码

fromnistbeaconimportNistBeacon# In the examples below I will be using 1447873020# as my <timestamp> when required# Current Record (or next closest)# https://beacon.nist.gov/rest/record/<timestamp>record=NistBeacon.get_record(1447873020)# Previous Record# https://beacon.nist.gov/rest/record/previous/<timestamp>prev_record=NistBeacon.get_previous(1447873020)# Next Record# https://beacon.nist.gov/rest/record/next/<timestamp>next_record=NistBeacon.get_next(1447873020)# First Record# https://beacon.nist.gov/rest/record/1378395540first_record=NistBeacon.get_first_record(download=True)# Last Record# https://beacon.nist.gov/rest/record/lastlast_record=NistBeacon.get_last_record()# Verify the record and the record chainrecord_chain_result=NistBeacon.chain_check(1447873020)

其他文档

请参考 official documentation 深入研究NistBeaconNistBeaconValue对象。

贡献

请参考 CONTRIBUTING github上的文档

项目健康

BranchBuild StatusCoverage Status
MasterMasterBuildMasterCoverage
DevelopDevelopBuildDevelopCoverage

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为游戏添加声音。需要帮助   java在获取数据时忽略模型类中的forign键映射   java为什么Microsoft JDBC驱动程序忽略failoverPartner主机名   java可以下载mozswing文件   java等价于ObjectOutputStream,不仅保存其状态,还保存整个对象?   Java Android LiveData根据其他LiveData调用房间查询   java如何使用jackson jsonNode实现这一点并获得所需的输出   在web服务器上作为web应用程序运行java应用程序?   groovy中java类的元类属性   返回空指针的java图形对象   标头中包含用户名和密码的java SOAP客户端请求   具有堆栈实现和递归的Hanoi算法塔(Java)   java当我运行这两个类时,我的老鼠不会移动   使用图像进行java相似图像搜索   Java8并行流机制   使用单例对象作为枚举元素的java Scala枚举,是否有可能对它们进行迭代?   java Webview更改高度大小   不可序列化对象和函数的java Spark Scala编程   java my app在eclipse中运行良好,而不是在jar中