1 Star 0 Fork 3

lidazhanghao/认证密钥交换协议实验

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
tools.py 562 Bytes
Copy Edit Raw Blame History
chgw authored 2022-07-08 13:24 . 完成了握手协议消息编码
def bitwise_and_bytes(a, b):
result_int = int.from_bytes(a, byteorder="big") & int.from_bytes(b, byteorder="big")
return result_int.to_bytes(max(len(a), len(b)), byteorder="big")
def bitwise_or_bytes(a, b):
result_int = int.from_bytes(a, byteorder="big") | int.from_bytes(b, byteorder="big")
return result_int.to_bytes(max(len(a), len(b)), byteorder="big")
def bitwise_xor_bytes(a, b):
result_int = int.from_bytes(a, byteorder="big") ^ int.from_bytes(b, byteorder="big")
return result_int.to_bytes(max(len(a), len(b)), byteorder="big")
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/lidazhanghao/key_exchange_lab.git
git@gitee.com:lidazhanghao/key_exchange_lab.git
lidazhanghao
key_exchange_lab
认证密钥交换协议实验
master

Search