Metadata-Version: 2.1
Name: prodamuspy
Version: 1.0.2
Summary: Prodamus hash verifier
Home-page: https://github.com/dnagikh/python-prodamus
Maintainer: Daniil Nagikh
Maintainer-email: dnagikh@gmail.com
License: LICENSE.md
Keywords: prodamus,hash,hmac,verify,sign
Classifier: Programming Language :: Python
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Plugins
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Security :: Cryptography
Description-Content-Type: text/markdown
License-File: LICENSE.md

# Prodamus hash verifier (HMAC)

Generate and verify Prodamus hash.

https://help.prodamus.ru/payform/integracii/rest-api/instrukcii-dlya-samostoyatelnaya-integracii-servisov#kak-prinyat-uvedomlenie-ob-uspeshnoi-oplate

## Installation
    
    pip install prodamuspy

## Usage

Init object:

    prodamus = prodamuspy.PyProdamus(API_TOKEN)

Parse query string to a dictionary:

    bodyDict = prodamus.parse(body)

Create signature:

    checkSign = prodamus.sign(bodyDict)

Verify signature:

    signIsGood = prodamus.verify(bodyDict, receivedSign)
    if signIsGood:
        print("Signature is awesome")
    else:
        print("Signature is incorrect")

## Copyright

Copyright 2023 [Max Arnold, Daniil Nagikh], all rights reserved.

This software is released under the MIT License.

A huge thank to https://github.com/max-arnold
