# HMAC Authentication (easy-hmac)

A pure python package that handles the generation and verification of HMAC 
signatures.

# Installation
TODO: modify installation instructions when the package is hosted on GITLAB.

This package is hosted at ???

## User
If you ARE NOT a developer, just install the package from TBD

## Developer
1. Clone this repository
2. Build the package in your local environment. Make sure you have a pipenv
    virtual environment active and run:

```shell
pipenv install build
pipenv shell
python -m build easy-hmac
```
3. Install the easy-hmac package in editing mode by running:

```shell
pip install -e easy-hmac
```

4. If you want to make sure everything went well, try running the tests from
    test_easy-hmac

```shell
python easy_hmac/test/test_easy-hmac.py
```

# Usage
`easy-hmac` provides two helper functions for HMAC authentication:

- `generate_hmac_sha256` - generates a SHA256 HMAC from two strings (a secret
    key and a http message)
- `verify_hmac` - given an HMAC and a message, verifies if the HMAC generated by
    the message is equal to the one passed as argument

