Skip to main content

lesscode_encryption是基于Rust语言开发的加密算法库

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

lesscode_encryption-0.0.3-cp310-none-win_amd64.whl (267.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

lesscode_encryption-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (397.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

lesscode_encryption-0.0.3-cp310-cp310-macosx_10_12_x86_64.whl (361.4 kB view details)

Uploaded CPython 3.10 macOS 10.12+ x86-64

lesscode_encryption-0.0.3-cp39-none-win_amd64.whl (267.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

lesscode_encryption-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (398.5 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

lesscode_encryption-0.0.3-cp39-cp39-macosx_10_12_x86_64.whl (362.5 kB view details)

Uploaded CPython 3.9 macOS 10.12+ x86-64

lesscode_encryption-0.0.3-cp38-none-win_amd64.whl (267.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

lesscode_encryption-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (398.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

lesscode_encryption-0.0.3-cp38-cp38-macosx_10_12_x86_64.whl (362.5 kB view details)

Uploaded CPython 3.8 macOS 10.12+ x86-64

lesscode_encryption-0.0.3-cp37-none-win_amd64.whl (267.8 kB view details)

Uploaded CPython 3.7 Windows x86-64

lesscode_encryption-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (398.5 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

lesscode_encryption-0.0.3-cp37-cp37m-macosx_10_12_x86_64.whl (362.7 kB view details)

Uploaded CPython 3.7m macOS 10.12+ x86-64

File details

Details for the file lesscode_encryption-0.0.3-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 58cd755aa21558a15539ebe2f9d75062ff5b3e92db4d6004742bada1db49ea88
MD5 07755ac7180e48f88053ff5c1a9c99aa
BLAKE2b-256 967de0db11b6a1a46e343214c08e747267e9ca9eced25f5a229681e984526456

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 252acd7e395d41702bdc934e3965afb005025e467cc511b7826945e9fa029476
MD5 7ecc97e3a120ed13ed43b0a8f887f934
BLAKE2b-256 7f57388598000943bb0e448b8b79d853826cc178cfbe970c2c1adbd893b40835

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f6c70e3661d0d57eb7c5c74f86661ef0c4b42e8422cfc29256979c6f10797ec4
MD5 25ccb50d9a4b54aac459c6df2033ae5c
BLAKE2b-256 709ef380d32ef74c357eb202b6937e485a91ad61e2e91399a8a8cd9fd4fe97f7

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 29caa356e8e8538171a903b7f87d5f307eb3fc323101ae622c968af4e4dd3579
MD5 84152482df98a479ef35fef676e479c5
BLAKE2b-256 6f3bbb9f661693a3ac20be389db7a2bac7905c3b6a542c7d7b84d87a530bb0fb

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0795ebb8bf69efd681951dcc2cf53b81157679ed17d47a110998ef211647fa09
MD5 f53e55e6d769528a946d35bc68cc1f07
BLAKE2b-256 4e7fb54684be9b2c1a4218c95bc1855e5652987e4d8a4384626608d4eeeb1d8a

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp39-cp39-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7e053c8ae25f46de98e794bf67db325f2a13a61adae370d0784a5479ed00ec11
MD5 6fa8b474b47027671672e72501de36f3
BLAKE2b-256 3aae6cf641bd1c6fd9252752ed63a4f57c105efdcafecb36316f2f42506a65e8

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 93d71bdc36cf0f21bccf4e208c610649ac0ba593d4151c2cab39148aac939d51
MD5 3f940a8d445bba1118a139f238a48825
BLAKE2b-256 477f7d6ea04d2fd2298ab321c2a73384a52143769a1b87a036e754a6b92f287a

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8a84b2e1f5fe72b667d58cae7fe2ccebce3d736964e3be306973103b2180efb
MD5 dd256e278bc1f632070d48dd48ee7fd2
BLAKE2b-256 6ada698c33766f57f3a04f70132e13068c25568dd1c36e6151ddacf1daf3f29e

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp38-cp38-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 92f5b948317f3317747faf2f28e586b905f0302ca451e4ee60781acc78b18793
MD5 4603487cb183abb7a897e530dd996bd2
BLAKE2b-256 0f42659d728e696dba23598f580c2dba96da6a39d9cab6c265e9f24376bc44b6

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp37-none-win_amd64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 998cbe82ff36198a925236df501ba521739dd999d34c23a83f97331c470b81f2
MD5 37df617418a251a9f48633e458326a2a
BLAKE2b-256 e9a173b4bca96c5c331346043e90af0da7b54c7ad13c482f5de28dbfffaf8e94

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 802ebd1cd7b13940158b46fcbb3e86981e44e9ec6aec08a551a28f0cbd799653
MD5 407d0ef3246372d3c2396277a6230110
BLAKE2b-256 72d819ac201a66e79f1a3458dfe07d88cf65fcbb2018cf03b555684cd147d891

See more details on using hashes here.

File details

Details for the file lesscode_encryption-0.0.3-cp37-cp37m-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for lesscode_encryption-0.0.3-cp37-cp37m-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0645d500e269afbdfff780a734c9fdbb377f5287c23566bd62200258a1dd8bee
MD5 ba5d8bfa5bfa5f365d1b9e94cf392e91
BLAKE2b-256 6f591c48970560839f515adae0bf1c2e5f65fa95a1041c8facdafdc12ae1a499

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page