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)
Release files for easyssl 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easyssl-1.0.3.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easyssl-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / easyssl-1.0.3.tar.gz
| Download URL | easyssl-1.0.3.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
462abc68d7dc76a39ba33bdc094e070b5a75d0c68f72e7f7f71f7eaa957dd066
|
|
BLAKE2b-256 checksum How to use checksums |
0bcdc3c609a8458c2c75000fccf00fd8b5b8426413c87f26b577f9a6ec7634f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / easyssl-1.0.3-py3-none-any.whl
| Download URL | easyssl-1.0.3-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9dada1a210a151611d5c9332070127f66146191bdfd105bb5e6a55d0d7c9531b
|
|
BLAKE2b-256 checksum How to use checksums |
94e9d892f2baa27c161e1a1e75df006c5e63b8a30f2c98179d727f4dd1d73c49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|