lesscode_encryption
lesscode_encryption是基于Rust语言开发的加密算法库
# sm2
from lesscode_encryption import LessCodeEncryption
key = LessCodeEncryption.sm2_gen_keypair()
origin_str = "hello navysummer"
sm2_encrypt_str = LessCodeEncryption.sm2_encrypt(key.pk, origin_str)
sm2_decrypt_str = LessCodeEncryption.sm2_decrypt(key.sk, sm2_encrypt_str)
assert sm2_decrypt_str == origin_str
# sm3
sm3_str = LessCodeEncryption.sm3_hex(origin_str)
# sm4
key = "8A3F8665AAEE6F7A0CB8F40B971E3373"
iv = "88BA27B390F466ABE7C4327E1E60270B"
sm4_ecb_encrypt_str = LessCodeEncryption.sm4_encrypt("ecb", origin_str, key)
sm4_ecb_decrypt_str = LessCodeEncryption.sm4_decrypt("ecb", sm4_ecb_encrypt_str, key)
assert sm4_ecb_decrypt_str == origin_str
sm4_cbc_encrypt_str = LessCodeEncryption.sm4_encrypt("cbc", origin_str, key, iv)
sm4_cbc_decrypt_str = LessCodeEncryption.sm4_decrypt("cbc", sm4_cbc_encrypt_str, key, iv)
assert sm4_cbc_decrypt_str == origin_str
Metadata
Release files for lesscode-encryption 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 4.1 MB
Release files / lesscode_encryption-0.0.3-cp310-none-win_amd64.whl
| Download URL | lesscode_encryption-0.0.3-cp310-none-win_amd64.whl |
|---|---|
| Size | 267.5 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
58cd755aa21558a15539ebe2f9d75062ff5b3e92db4d6004742bada1db49ea88
|
|
BLAKE2b-256 checksum How to use checksums |
967de0db11b6a1a46e343214c08e747267e9ca9eced25f5a229681e984526456
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Release files / lesscode_encryption-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | lesscode_encryption-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 397.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
252acd7e395d41702bdc934e3965afb005025e467cc511b7826945e9fa029476
|
|
BLAKE2b-256 checksum How to use checksums |
7f57388598000943bb0e448b8b79d853826cc178cfbe970c2c1adbd893b40835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / lesscode_encryption-0.0.3-cp310-cp310-macosx_10_12_x86_64.whl
| Download URL | lesscode_encryption-0.0.3-cp310-cp310-macosx_10_12_x86_64.whl |
|---|---|
| Size | 361.4 kB |
| Tags | CPython 3.10 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f6c70e3661d0d57eb7c5c74f86661ef0c4b42e8422cfc29256979c6f10797ec4
|
|
BLAKE2b-256 checksum How to use checksums |
709ef380d32ef74c357eb202b6937e485a91ad61e2e91399a8a8cd9fd4fe97f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / lesscode_encryption-0.0.3-cp39-none-win_amd64.whl
| Download URL | lesscode_encryption-0.0.3-cp39-none-win_amd64.whl |
|---|---|
| Size | 267.7 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
29caa356e8e8538171a903b7f87d5f307eb3fc323101ae622c968af4e4dd3579
|
|
BLAKE2b-256 checksum How to use checksums |
6f3bbb9f661693a3ac20be389db7a2bac7905c3b6a542c7d7b84d87a530bb0fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Release files / lesscode_encryption-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | lesscode_encryption-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 398.5 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
0795ebb8bf69efd681951dcc2cf53b81157679ed17d47a110998ef211647fa09
|
|
BLAKE2b-256 checksum How to use checksums |
4e7fb54684be9b2c1a4218c95bc1855e5652987e4d8a4384626608d4eeeb1d8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / lesscode_encryption-0.0.3-cp39-cp39-macosx_10_12_x86_64.whl
| Download URL | lesscode_encryption-0.0.3-cp39-cp39-macosx_10_12_x86_64.whl |
|---|---|
| Size | 362.5 kB |
| Tags | CPython 3.9 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
7e053c8ae25f46de98e794bf67db325f2a13a61adae370d0784a5479ed00ec11
|
|
BLAKE2b-256 checksum How to use checksums |
3aae6cf641bd1c6fd9252752ed63a4f57c105efdcafecb36316f2f42506a65e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / lesscode_encryption-0.0.3-cp38-none-win_amd64.whl
| Download URL | lesscode_encryption-0.0.3-cp38-none-win_amd64.whl |
|---|---|
| Size | 267.8 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
93d71bdc36cf0f21bccf4e208c610649ac0ba593d4151c2cab39148aac939d51
|
|
BLAKE2b-256 checksum How to use checksums |
477f7d6ea04d2fd2298ab321c2a73384a52143769a1b87a036e754a6b92f287a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Release files / lesscode_encryption-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | lesscode_encryption-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 398.4 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b8a84b2e1f5fe72b667d58cae7fe2ccebce3d736964e3be306973103b2180efb
|
|
BLAKE2b-256 checksum How to use checksums |
6ada698c33766f57f3a04f70132e13068c25568dd1c36e6151ddacf1daf3f29e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / lesscode_encryption-0.0.3-cp38-cp38-macosx_10_12_x86_64.whl
| Download URL | lesscode_encryption-0.0.3-cp38-cp38-macosx_10_12_x86_64.whl |
|---|---|
| Size | 362.5 kB |
| Tags | CPython 3.8 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
92f5b948317f3317747faf2f28e586b905f0302ca451e4ee60781acc78b18793
|
|
BLAKE2b-256 checksum How to use checksums |
0f42659d728e696dba23598f580c2dba96da6a39d9cab6c265e9f24376bc44b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / lesscode_encryption-0.0.3-cp37-none-win_amd64.whl
| Download URL | lesscode_encryption-0.0.3-cp37-none-win_amd64.whl |
|---|---|
| Size | 267.8 kB |
| Tags | CPython 3.7 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
998cbe82ff36198a925236df501ba521739dd999d34c23a83f97331c470b81f2
|
|
BLAKE2b-256 checksum How to use checksums |
e9a173b4bca96c5c331346043e90af0da7b54c7ad13c482f5de28dbfffaf8e94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Release files / lesscode_encryption-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | lesscode_encryption-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 398.5 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
802ebd1cd7b13940158b46fcbb3e86981e44e9ec6aec08a551a28f0cbd799653
|
|
BLAKE2b-256 checksum How to use checksums |
72d819ac201a66e79f1a3458dfe07d88cf65fcbb2018cf03b555684cd147d891
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / lesscode_encryption-0.0.3-cp37-cp37m-macosx_10_12_x86_64.whl
| Download URL | lesscode_encryption-0.0.3-cp37-cp37m-macosx_10_12_x86_64.whl |
|---|---|
| Size | 362.7 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
0645d500e269afbdfff780a734c9fdbb377f5287c23566bd62200258a1dd8bee
|
|
BLAKE2b-256 checksum How to use checksums |
6f591c48970560839f515adae0bf1c2e5f65fa95a1041c8facdafdc12ae1a499
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|