Comments (3)
你可能是对于 python 的语法不是很熟悉,gmalg 提供的所有接口函数参数均为字节数组类型 bytes
,即二进制流,如果你需要使用 16 进制数字表示的字节串,可以按照如下方式调用:
pk = gmalg.SM2().generate_pk(bytes.fromhex("1c87c99c7ff9e74fa9d52f9744f48a7ed9ee99aceefceb288b40dcb2fde30067"))
print(pk.hex())
from gmalg.
是对的,我没有做数据转换。
from gmalg.
如果没问题就可以 close 了。
from gmalg.
Related Issues (9)
- sm2的实现有两个问题 HOT 18
- SM2解密相关 HOT 1
- SM9密文顺序问题 HOT 8
- SM2密钥交换 HOT 1
- sm9加密明文的方法结合密钥派生函数的分组密码算法 HOT 1
- sm2密钥交换问题
- sm2私钥计算公钥问题 HOT 2
- 当SM9签名和验签分开在不同请求时,验签失败,请问是什么原因呢? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmalg.