Skip to main content

A Python package for cryptography in payment systems

Project description

PyPI Test coverage

psec provides tools for protecting sensitive data and cardholder authentication in retail payment transactions.

Install:

pip install psec

psec consists of the following modules:

  • cvv - Card Verification Value generation

  • des - Triple DES utilities

  • mac - Message Authentication Code generation

  • pin - Personal Identification Number generation

  • pinblock - PIN Blocks encoding and decoding

  • tools - Miscellaneous support tools

For example:

>>> import psec
>>> psec.pin.generate_visa_pvv(
...     pvk = bytes.fromhex("0123456789ABCDEFFEDCBA9876543210"),
...     pvki="1",
...     pin="1234",
...     pan="4321000000001234")
'6629'

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

psec-1.0.1.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

psec-1.0.1-py3-none-any.whl (13.0 kB view hashes)

Uploaded Python 3

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