A Python library for encrypt CreditCard data for Zuora Payment Gateway
Project description
PyZouraEncode
pyZuoraEncode is a Python library for encrypting card data using RSA public keys, ideal for integrations with Zuora or other systems that require secure data transmission.
Installation
You can install the library using pip:
pip install -U pyZuoraEncode
Usage
from pyZuoraEncode import ZuoraEncrypt
# Initialize a public key
public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAld9m3u5AUMAxgbU9sPgzU3rDWVnxpKgpvJPQG5hVZULIxtdaBmRO8zD1WvzeZrj5dFsY4ohipCDS52kszz2w4Ex/p4fGkJh7+1yEp1HvSO9wx1f2p+JVIEdyTH7RtpX2RdejXurukHmZkb/++579ewXVNYMu5Ak152CqppyyaT/V1wus+s9966715Jlf1mTDLh5Lu4pugGoUnZfgIWwB7gVJJoHGJizSlIb1Mw7OQZtYAQjuaYlxXZPghAFIXLwP4XC5QSlK1/P2Rqh7OSuNbC6aNowgf5nUqqsjl8iz5Jhjja4hIqxmO20ilXdhT2y2awevWR10F8cvFkOWYB380QIDAQAB"
zuora = ZuoraEncrypt(public_key)
# Encrypt data
Card = "4242424242424242|12|2030|025"
Card_Encrypted = zuora.encrypt(Card)
print(Card_Encrypted)
# Result: Ohyqa+uLuEKUYhfVTtGESLYLS6...
Main Methods
| Method | Description |
|---|---|
ZuoraEncrypt(public_key=None) |
Initializes the object with an optional public key. |
| set_key(public_key) | Sets or changes the public key. |
| encrypt(data) | Encrypts a string and returns the result in base64. |
Requierements 
• Python 3.6 or higher
• PyCriptoDome:
pip install pycryptodome
Authors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyZuoraEncode-1.1.5.tar.gz
(16.2 kB
view details)
File details
Details for the file pyZuoraEncode-1.1.5.tar.gz.
File metadata
- Download URL: pyZuoraEncode-1.1.5.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25489e9cac792586d14988291943c064ace420e6031356e55c14228f4c00f55c
|
|
| MD5 |
17ac2df95f3ce2bf3ef7b51f60679d81
|
|
| BLAKE2b-256 |
e7079d5ef1e52d07db64dcab8df3070d62130d85be52725265271c5a3caf3e18
|