Skip to main content

Azlibs — a Package for dev library by AkzDev

Project description

Azlibs V1.0.0

A Family Dev Project

in Package

  • RSA & OAEP PROJECT
  • base 16 to 91

Features on RSA & OAEP

  • RSA key generation (512–4096 bits)
  • OAEP secure padding (SHA-256)
  • Text encryption & decryption
  • Digital signature support (sign & verify)
  • Pure Python - no external dependencies

Features on our base

  • Base enc/dec: base16, base32, base85, base62, base64, base91
  • Pure Python script - no external dependencies

Installation Azlibs

pip install azlibs

Usage of RSA

Generate RSA Keypair

from Azlibs.RSATools import genkey

# Generate a 2048-bit RSA keypair
public_key, private_key = genkey(2048)

print("Public Key:", public_key)
print("Private Key:", private_key)

Encrypt and Decrypt Text

from Azlibs.RSATools import encrypt_text, decrypt_text

message = "Hello from AkzDev!"
cipher = encrypt_text(message, public_key)
print("Encrypted:", cipher)

decrypted = decrypt_text(cipher, private_key)
print("Decrypted:", decrypted)

Output (contoh):

Encrypted: 592031591054735219...
Decrypted: Hello from AkzDev!

Sign and Verify Messages

from Azlibs.RSATools import sign_message, verify_signature

msg = "This is an important message"
signature = sign_message(msg, private_key)
print("Signature:", signature)

# Verification
is_valid = verify_signature(msg, signature, public_key)
print("Valid:", is_valid)

Output (contoh):

Signature: 38475018274018247...
Valid: True

Usage base

Encryption (base64 example)

from Azlibs.base import b64enc

a = "Hallo World"
b = b64enc(a)
print("encrypted text :", b)

Decryption (base64 example)

from Azlibs.base import b64dec

a = "SGFsbG8gV29ybGQ="  # Hello World
b = b64dec(a)
print("plaintext from decrypt :", b)

License

This project is licensed under the MIT License — see LICENSE for details.
Made with love by AkzDev Team
A project proudly part of the Akuzz Open Source Ecosystem.

Note

Azlibs is still in Version 1.0.0

“Azlibs: simple, powerful, and open for every developer.”

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

azlibs-2.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

azlibs-2.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file azlibs-2.0.tar.gz.

File metadata

  • Download URL: azlibs-2.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for azlibs-2.0.tar.gz
Algorithm Hash digest
SHA256 ac523c98f31099a9d29954152e72865c8fc8a4b544bb3c5e400b20e834bf2054
MD5 dc4a45a6c0deee7dbc01adb4bbb880ce
BLAKE2b-256 0ebb84bb540099c47a136bff28b18437e0b4cf1fc4992915599e2a3cf9eb6cc4

See more details on using hashes here.

File details

Details for the file azlibs-2.0-py3-none-any.whl.

File metadata

  • Download URL: azlibs-2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for azlibs-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8758f7ed986f74deb38470a715d726ecff4a850f6b60960d6935c240f5d65951
MD5 63429a447097551bd5755a27d55484d2
BLAKE2b-256 6cc5047603d272136416f4d4142a11a2b75ab3f7142bd86749cccf33243892d5

See more details on using hashes here.

Supported by

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