Skip to main content

K07VN_Crypto

https://github.com/TNK-ADMIN/K07VN_Crypto

  • Vẫn hoạt động ổn định cho tới hiện tại
  • Sử dụng Python >= 3.6

Installation

pip install K07VN_Crypto

hoặc bạn có thể install từ github:

pip install git+https://github.com/TNK-ADMIN/K07VN_Crypto@master

Usage

Cơ Bản

Về cơ bản bạn chỉ cần install và import thư viện

from K07VN_Crypto import Crypto

Và sau đó có thể gán cho 1 biến hoặc không rồi sử dụng`

Generate Key

crypto_instance = Crypto()

private_key, public_key = Crypto.generate_key()

plaintext = "Hello, World!"
encrypted_text = crypto_instance.encrypt(plaintext)
print("Encrypted:", encrypted_text)

decrypted_text = crypto_instance.decrypt(encrypted_text)
print("Decrypted:", decrypted_text)

Custom Key


public_key = """\
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCXBKdgaHDJGAe9lk8Y0osRTEe
VT7s6n2POfJSPVRnj4pIBu3x2oqFlyuyZlxQfhBCOaK3kagiclePQFGuIt39r/j9
UgmXucae6XVDMRJYjCLBFvX5A93iKtuxYHs7PiHsH7B92Rc0xhKNmcyVhGoicrqd
qcReN1CExmVpSt0yJwIDAQAB
-----END PUBLIC KEY-----"""

private_key = """\
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQCCXBKdgaHDJGAe9lk8Y0osRTEeVT7s6n2POfJSPVRnj4pIBu3x
2oqFlyuyZlxQfhBCOaK3kagiclePQFGuIt39r/j9UgmXucae6XVDMRJYjCLBFvX5
A93iKtuxYHs7PiHsH7B92Rc0xhKNmcyVhGoicrqdqcReN1CExmVpSt0yJwIDAQAB
AoGAbVS1VB5lwhme+DjajLglfE2nrW4HcYIVPmt2HZ1MTfLoIhKVu9LzfKlVv7Dz
2ZpxHmniW50w63sEjqN+HdMmZKyVHM/zvy2Sb1Soz+AJQ8xzL6Lw1KWpXuIObA5P
zfNyQt1AZFuqCamBsKmCHhgpSqypCKtxx5q+PBsbTg1rSeECQQC6cWPEkchWTD13
5f/UDs5qCcubQ3JBxLFtUImLDDoNjD1QtOzK0n9+05sD6YTKZXbrq6bhqf5m0rzJ
0ZUCmnCRAkEAsv5WJhnuyIsLsGhKkIZ1UfLluLopd0tHhK7riyM+j4SJf955FVFp
i29R2DhiKXFUms2Q/VOy3CsgBXK2rjBTNwJBALOG7+yd++ytKRtEy1zkjPoqSHZP
MbwGrFp4jJjpwxS8j2YhcUmz+7SiCchwmb9SiHpSJTVyvVdBYSxstTF2iSECQA2u
58MN5HUsO/6GWnzl6n4TRYBzqsvV02fPP25piVTLWv+NcFAy4xCnt+gBl293nHIh
GN5k0Z2HJnGELXbvds0CQQCIR5KG1o0Tb5ZCB0PoHZEVvBbSh0qLRkNwA5IO4npU
j26wV8QxpL9EAadJssR+X1Rky551qWPgWOc1RA2bBzXQ
-----END RSA PRIVATE KEY-----"""
crypto_instance = Crypto(public_key,private_key)
plaintext = "Hello, World!"
encrypted_text = crypto_instance.encrypt(plaintext)
print("Encrypted:", encrypted_text)

decrypted_text = crypto_instance.decrypt(encrypted_text)
print("Decrypted:", decrypted_text)

Kết thúc

Contact

Zalo: 0964243159

Telegram: @tnk_k07vn

Metadata

Release files for K07VN-Crypto 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for K07VN-Crypto 1.0.5
File Size Uploaded Provenance Actions
K07VN_Crypto-1.0.5.tar.gz 4.0 kB Without provenance Details for K07VN_Crypto-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for K07VN-Crypto 1.0.5
File Interpreter ABI Platform Actions
K07VN_Crypto-1.0.5-py3-none-any.whl Python 3 none any Details for K07VN_Crypto-1.0.5-py3-none-any.whl

Total release size: 7.9 kB

Release files / K07VN_Crypto-1.0.5.tar.gz

Download URL K07VN_Crypto-1.0.5.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
94d62af5e236fc8c88284d34203e0e83e82d11eee31ff628cc1cd0206a4dc3a3
BLAKE2b-256 checksum
How to use checksums
e57a5a857c2636621d117471f2f0b6f126ad3fff9130c149726e50f6b6d1fdf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / K07VN_Crypto-1.0.5-py3-none-any.whl

Download URL K07VN_Crypto-1.0.5-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94970f2a4cf95fb4bb5602ebd97e2605798c577ccf6193c7edd7b3368ace7384
BLAKE2b-256 checksum
How to use checksums
68ad7f48e93ad61374dfa33dd68a0c44fbb07aae1cc3064ea512d353b7559eda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for K07VN-Crypto 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page