Skip to main content

python version of rsa

Project description

Python RSA加解密封装

解除只能用公钥加密的限制

示例

from RealRsa import Rsa


pyrsa = Rsa()

pub_key = """
-----BEGIN RSA PUBLIC KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END RSA PUBLIC KEY-----
"""

data = "1bff1dfb66a599777dfe4d5edad268d41866e8f82d9604d6b750e2106b292cf2e11690420f515c3fe06d5fe851dc977e1eb3f0f610881659cb8fbf78e3e0dbc260dd7876146fc2b0e24a059fdf4d9540e8b1f9f755006085f491980248c345da03ff50edb77561bc5a304dc9ab658540cfbed4ebf828a351058abe7af508d5a19fa8dce65955d4f535618cba8fa115454fac166bf53784d51f319a56e3de071d766bda8c1683a74f10c9ee873daa710d233b53bcf8cbf7e0f9e48c13d9a1096ee3971c7c35b1b4bf4a4c6cdb4518c75147d5a21ed17fe161075baad4512ab3d4cf994f1bd5ca983fbf255f65b6a5d321ed68999cbff9b7e1b5dc9fc358d7a247"

ret = pyrsa.pub_decrypt(bytes.fromhex(data), pub_key)
print(ret)

ret = pyrsa.pub_encrypt("23342321",pub_key)
print(ret)

Project details


Download files

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

Source Distribution

realcrypto-0.0.1.tar.gz (74.4 kB view details)

Uploaded Source

Built Distributions

RealCrypto-0.0.1-cp312-cp312-win_amd64.whl (42.1 kB view details)

Uploaded CPython 3.12 Windows x86-64

RealCrypto-0.0.1-cp312-cp312-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

RealCrypto-0.0.1-cp311-cp311-win_amd64.whl (42.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

RealCrypto-0.0.1-cp311-cp311-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

RealCrypto-0.0.1-cp310-cp310-win_amd64.whl (42.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

RealCrypto-0.0.1-cp310-cp310-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

RealCrypto-0.0.1-cp39-cp39-win_amd64.whl (42.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

RealCrypto-0.0.1-cp39-cp39-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

RealCrypto-0.0.1-cp38-cp38-win_amd64.whl (42.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

RealCrypto-0.0.1-cp38-cp38-manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

File details

Details for the file realcrypto-0.0.1.tar.gz.

File metadata

  • Download URL: realcrypto-0.0.1.tar.gz
  • Upload date:
  • Size: 74.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for realcrypto-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c2b8fd72805c6a30d396cf8611e4e89af82ee21df2bd504df419d4bc063fa2cd
MD5 5c83322cc6365fa55c70a44b0cbb71f6
BLAKE2b-256 07eb32326faa45e1c308206c9e0165d6df4b0a9fed23b45c0df1676ed303fcc2

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for RealCrypto-0.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5731536d6c5a30905eee3a477ab07f74d12ed0dfca88358a90ddf0c4a1eae7c3
MD5 63e0750490ef71854164e0a916b1bb5e
BLAKE2b-256 115c016338dcdf2713e289820bb2019553a4f38df72425d8ff372ed09b8aa711

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for RealCrypto-0.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a33119f07df9da42894f12467288653a3ac390523006a5f71cf8b0afed427b63
MD5 618743d8a04c3b688b9754bd2e8aeb21
BLAKE2b-256 8691ec00e58dfbc821ee9805a111a6620c0c579c2532852cefee7defa0cb2b34

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for RealCrypto-0.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 32995092c219d5ee0effdb6844112e251e26c46b7c86c452fd9175070c1cc0cd
MD5 b91d9e378da033618e757fb0f8c27342
BLAKE2b-256 68dca27fd33a422548b42a853e904891ffbd97a86a1a4940fad4e56e7f4c09ee

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for RealCrypto-0.0.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aabac7f8ac2ecddbfeee23752b5d43c71ce1b48ab8552a4a3b5aae68ee255941
MD5 d287bbfef6943d20db1b487b86908f66
BLAKE2b-256 dddf9fad48d021c3d67ce1cf2e2d2b7058f32574e3188c09062597356047d7ad

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for RealCrypto-0.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b6641fe84493c4576817e1198328f94b61dce8b7e99a3d12503294e57e907292
MD5 79f02b26b0f9aa938a236c72c2adea6d
BLAKE2b-256 2fd2ce1c4d4e646d0c1f52edfcf1ce7974265f7357c8982787560365fcf9f4cd

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for RealCrypto-0.0.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 12c5f53d16d1103bc0c74f8e4d74aa615dbd538e066a4f4a41a33fb3c11d578d
MD5 880dcb8046711304644c2f989a00cd51
BLAKE2b-256 79d8bed978064c20146a0d27be7073709a40a8715bdd6778a5bfd31562b947cf

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: RealCrypto-0.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for RealCrypto-0.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d4d480a16891cecef3a1810a42de8da12d7abe6afb3e791b0738e074d823d0c7
MD5 5153ede4e5e07ae7b969929d6865d430
BLAKE2b-256 638213f9f3291b58453da9ad82ed6c785fe6906b32c970c7f62f9ab315d4e79d

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for RealCrypto-0.0.1-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b7fd58674e12f4bc75cdc68ec1d5a1910ed19ddd1f56e87eddbeb72d53323666
MD5 2e729b465a2d5f11c92c95a4dad6cdf0
BLAKE2b-256 bdc699f23085fc5f794cefdbf99261baf20d41eab79b9974d437c4b8d3d7fed3

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: RealCrypto-0.0.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for RealCrypto-0.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 752a9999be19f61a7e77578dad8847b85001a4fd65e64f8c683e532425914c53
MD5 1ef97f498fde0ce13d9b6fa60def3f6e
BLAKE2b-256 e8d7abc8630062854ac877b88309e502b0e48864b1bfda03d346bf769cdb3373

See more details on using hashes here.

File details

Details for the file RealCrypto-0.0.1-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for RealCrypto-0.0.1-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 085c08927a642bea94f66ab6d1a185122eb3bde0f4cea0df6fc970791c00d5dd
MD5 08062a39ccce0b3cb31261f630d57209
BLAKE2b-256 66e186a3b87dc329b9f083bc0fe10cb7011717a825bb15fe8c1ef1c8d4c71dab

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