访问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根据两个数组的值对数组进行排序   具有自签名证书和NTLM代理的java Maven SSL repo错误   java自定义字体按钮不工作AndroidStudio   java通过Spring MVC web应用程序向客户端发送文本文件   Java Spring Web服务SOAP身份验证   ANT property environment=“env”无法在JAVA中检索它,但如果作为ANT命令运行,则可以正常工作   java是为spring mvc rest api或spring boot api对应用服务器的每个新请求创建的服务、存储库和组件的新实例吗?   java私有静态最终字符串未完成其工作   PKCS12的安全Java密钥重新处理   java JPA继承表每类SQLSyntaxErrorException