SM4 symmetric encryption utilities
Project description
xj-sm4-utils
SM4 symmetric encryption utilities in a single Python module.
Install
pip install xj-sm4-utils
Quick Start
import xj_sm4_tools
key = b"2021110824051457"
iv = b"1234567890abcdef"
plain = b"hello sm4"
cipher = xj_sm4_tools.SM4Utils.encrypt_CBC_Padding(key, iv, plain)
restored = xj_sm4_tools.SM4Utils.decrypt_CBC_Padding(key, iv, cipher)
print(restored.decode("utf-8"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xj_sm4_utils-0.1.tar.gz
(6.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xj_sm4_utils-0.1.tar.gz.
File metadata
- Download URL: xj_sm4_utils-0.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b67f51ccab28bbebd5aead1cf515d24d3aeb452d3892967aa27c58ae7952de87
|
|
| MD5 |
31983e009db724e88b04adf8c664da85
|
|
| BLAKE2b-256 |
985a34fbe939a980679084c85fa1a309fbe6565c49155704af0adceed821f7c2
|
File details
Details for the file xj_sm4_utils-0.1-py3-none-any.whl.
File metadata
- Download URL: xj_sm4_utils-0.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
affe584aa64f681cbb50002c0f5b3e3a5b85c91ab36babc3496c58824044e290
|
|
| MD5 |
2f9d2ecbe301b70211cfb199e9c07391
|
|
| BLAKE2b-256 |
3ded4fa4235b9a167ce539d9415cd76e8c7b4ded80b8288be67a24de9531b2e6
|