Easy OpenSSL Utilities
Project description
easyssl
Functions
| Module | Function | Use Case |
|---|---|---|
| ssl | to simplify openssl | Simple en/de-cryption implement to build your own app. |
| ca | to simplify x.509 | Maintain your own CA and sign crt on demand easily. |
Encryption
import json
import datetime
import socket
from easyssl import ssl
hostname = socket.gethostname()
time_stamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
k = ssl.Key()
k.load_pubkey()
plain_text = hostname + '__-__' + time_stamp
plain_text = json.dumps(
{
'k1': 'v1',
'k2': 'v2',
'k3': 'v3',
}
)
k.encrypt(plain_text=plain_text)
Decryption
import json
import datetime
import socket
from easyssl import ssl
k = ssl.Key()
k.load_prikey()
encrypted_text = 'F/IicdulrsDfrTsrR7ainjM23+kV8/7Li7pbLb/Zn6VGJD4Y9Nz18f4rb7WCW7di1TIzr+qTpY8nAI4DbphCC3FfGrIYgoBY0pCuzOng79R/Rrpgm4VIHbiGdssP7W1ihsksgd4ttcG9KR7GfJeeGaOlK5w1vl/9inveuUB8hQA4bhmrpEK/+HmYxXPtVadW3ZqRNf8wyGJwED63d1U7N7iO6Q5Rph2t1hmVKKRZ9uTeeAno1oo2a2N6xQ1IiwUkqsjggYkiLbCjm28/lony/2QtqvSdEzOmHzlTFeamcZqN5zxrkh2ozq07kJo6xibpN0EMSSgBZUaTLG2WtGbvoA=='
k.decrypt(encrypted_text)
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
easyssl-1.0.3.tar.gz
(3.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easyssl-1.0.3.tar.gz.
File metadata
- Download URL: easyssl-1.0.3.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
462abc68d7dc76a39ba33bdc094e070b5a75d0c68f72e7f7f71f7eaa957dd066
|
|
| MD5 |
7c149be576f781360b61f84a7180e549
|
|
| BLAKE2b-256 |
0bcdc3c609a8458c2c75000fccf00fd8b5b8426413c87f26b577f9a6ec7634f7
|
File details
Details for the file easyssl-1.0.3-py3-none-any.whl.
File metadata
- Download URL: easyssl-1.0.3-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dada1a210a151611d5c9332070127f66146191bdfd105bb5e6a55d0d7c9531b
|
|
| MD5 |
c915d7b7e2ee2ca98d2d81d2e49665ff
|
|
| BLAKE2b-256 |
94e9d892f2baa27c161e1a1e75df006c5e63b8a30f2c98179d727f4dd1d73c49
|