Skip to main content

Module for decrypting doubleclick price confirmations

Project description

DoubleClickCrypto

Python module for decrypting doubleclick price confirmations.

See https://developers.google.com/authorized-buyers/rtb/response-guide/decrypt-price.

Installation

pip install git+https://github.com/danielhedren/doubleclickcrypto.git

Example usage

Look at the test cases in the source for more examples.

Simple decryption

from doubleclickcrypto import DoubleClickCrypto

e_key = "skU7Ax_NL5pPAFyKdkfZjZz2-VhIN8bjj1rVFOaJ_5o="
i_key = "arO23ykdNqUQ5LEoQ0FVmPkBd7xB5CO89PDZlSjpFxo="
enc = "YWJjMTIzZGVmNDU2Z2hpN7fhCuPemCce_6msaw"

DoubleClickCrypto.decrypt(enc, e_key, i_key)
#  -> 100

Check for stale response

DoubleClickCrypto.decrypt(enc, e_key, i_key, max_timedelta_seconds=0)
#  -> throws StaleResponseException

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

doubleclickcrypto-0.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

doubleclickcrypto-0.1-py3-none-any.whl (4.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