A simple WireGuard key generator writen in python.
Project description
PyWgKey
A simple WireGuard key generator writen in python.
Installation
pip install pywgkey
Usage
$ python -m pywgkey -h
usage: python -m pywgkey [-h] [-b] [-w] [-p] string
Generate wg keypair containing specified string
positional arguments:
string The string that must be found in the pubkey
optional arguments:
-h, --help show this help message and exit
-b, --begining If the pubkey must start with the string (default: False)
-w, --write Write keys to files
-p, --psk Genarate a preshared key as well
Generate and print a keypair containing a string
$ python -m pywgkey test
Your public key is: 1f810nNMhOB8mYpGbEvDwmXTeStPMycLiHpw0/CeL1c=
Your private key is: 75C5ahPr5UY3paWXvLRKd82EK7KWuDDJ0D9h7/p21Us=
Generate and write the keys to the current folder
$ python -m pywgkey test -w
Keys have been writen to test.pub and test.priv
$ cat test.pub
1f810nNMhOB8mYpGbEvDwmXTeStPMycLiHpw0/CeL1c=
$ cat test.priv
75C5ahPr5UY3paWXvLRKd82EK7KWuDDJ0D9h7/p21Us=
If you want the public key to start with a string (case is ignored)
$ python -m pywgkey test -b
Your public key is: TEsTtKLgqud0Yohg8geFKcnGy99xFzZlMvSv2YbwT1Y=
Your private key is: paknyfh/d0LhZP2LqtjzJs2UE6XwaN14irxFdLV6d94=
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pywgkey-1.0.0.tar.gz
(6.9 kB
view details)
Built Distribution
File details
Details for the file pywgkey-1.0.0.tar.gz
.
File metadata
- Download URL: pywgkey-1.0.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5769432544737f6233a4b4b7f55b606bde65938d3ab99a4e2da6f43253ba9c27 |
|
MD5 | e5c3e1ec780827e2ffd25662a68febc5 |
|
BLAKE2b-256 | c6a4a212d614185a9f6ed3626557506900691cc9684a16e4ce4245c51eb7d6cd |
File details
Details for the file pywgkey-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pywgkey-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dd4c3c71e7aa1611ca3722dfa545674fc77a47d536a3bbf73da5502e4a13d14 |
|
MD5 | 31bedf099315b5e58f3a697b61355898 |
|
BLAKE2b-256 | 38899d3c0c2d681cac10daa3dd63287156cd185d852ea549c2028b6eca179359 |