Metadata-Version: 2.3
Name: hepg
Version: 0.1.0
Summary: Hash Encode Password Generator
Author: ars6502
Author-email: ars6502 <arun.r.sharma@proton.me>
Requires-Dist: mpmath>=1.4.1
Requires-Dist: typer>=0.24.1
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# Hash Encode Password Generator

A library that generates keys using hashing and encoding.

The difference with other password generators is that you use a simple word to generate complex passwords.

Setting your pet name as a password is not secure. But having a method generating a complex password out of it, can be.

## How it works

The process works as follows:

* You have a predefined string which you know and will contain your password eg "My Dog's name is {input}"
* You replace input with your pet name eg "simba". That makes the string "My Dog's name is simba"
* This string is now goes through hashing with a chosen algorithm (MD5, SHA256, SHA512)
* The hashed string now is encoded in a chosen format (hex, base32, base64, base85)


## Complexity support

### Time constraints

In the formatted string, some date functions are supported to make encode time in it, so that you can create an expiration effect if used in the server:

- Y : current year
- M : current year and  month
- D : current year month and day
- H : current year month day and hour
- W : current year and week in year
- Q : current year and quarter of year



### PI digits

If you want to have a complex string without remebering it, the PI function will add the PI digits between the range of (pi-from to pi-to). That means if you add  {PI} in your formatted string and declare pi-from=321 pi-to =1231, it will insert the digits between these positions. (It starts from position 0 being the 3 in 3.14)


## Examples

```bash
hepg -t "Hello {input}" -i "World" -a sha256 -e base64

```

> Output:
```plaintext
pZGm1Av0IEBKARczz7exkNYsZb8LzaMrV7J32a2fFG4
```

```bash
hepg -t "Hello {input}" -i "World" -a sha256 -e hex
```
> Output:
```plaintext
a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
```

```bash
hepg -t "Hello {input}" -i "World" -a sha512 -e base85
```
> Output:
```plaintext
EOh-B?XTDlgh#N{XF={HJASuK(iEBsvAHB~vjc+ieuX`Sg>jw^XUp0Rs*h1;5M*IpWLn~S%N4(|M1Mt_
```



