Name | einar JSON |
Version |
2.0.0
JSON |
| download |
home_page | None |
Summary | Python3 password manager library. |
upload_time | 2025-08-10 22:31:08 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | GPLv2 license |
keywords |
password
manager
tools
cli
pass
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Einar



<a href="https://pypi.org/project/einar/"><img src="https://img.shields.io/pypi/v/einar" /></a>
## Python3 library that implements AES-128, AES-192, AES-256 encryption in ECB and CBC modes.
### Install
```bash
pip install einar
```
### Quickstart
```python
from einar import AES
key = b'' # The key can be any size; it will be padded or truncated to the required length.
# AES-256 CBC example
iv = b'1234567890abcdef' # Required for CBC mode, must be 16 bytes
cipher = AES(key, keyLen=256, mode="CBC", iv=iv)
message = b'Secret message to encrypt'
```
### Encrypt
```python
ciphertext = cipher.encrypt(message)
print(f"Ciphertext (hex): {ciphertext.hex()}")
```
### Decrypt
```python
original_text = cipher.decrypt(ciphertext)
print(f"Original text: {original_text.decode('utf-8')}")
```
### Modes
#### ECB (Electronic Codebook)
```python
cipher = AES(key, keyLen=128, mode="ECB")
ciphertext = cipher.encrypt(message)
original_text = cipher.decrypt(ciphertext)
```
#### CBC (Cipher Block Chaining)
```python
iv = b'1234567890abcdef' # 16 bytes
cipher = AES(key, keyLen=256, mode="CBC", iv=iv)
ciphertext = cipher.encrypt(message)
original_text = cipher.decrypt(ciphertext)
```
### CLI
Einar includes a command-line interface for encryption and decryption:
```bash
einar -e "Secret message" -kl 256 -m CBC
```
### License
Distributed under [GPL v2 or later](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
### Author
Juan
Raw data
{
"_id": null,
"home_page": null,
"name": "einar",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "password, manager, tools, cli, pass",
"author": null,
"author_email": "Juan Bindez <juanbindez780@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/01/cc/28b95c27ce0afa149acfe1ae4d7d8f3fc784b9f3711c9217fd3cde2a658f/einar-2.0.0.tar.gz",
"platform": null,
"description": "# Einar\n\n\n\n\n<a href=\"https://pypi.org/project/einar/\"><img src=\"https://img.shields.io/pypi/v/einar\" /></a>\n\n## Python3 library that implements AES-128, AES-192, AES-256 encryption in ECB and CBC modes.\n\n### Install\n```bash\npip install einar\n```\n\n### Quickstart\n\n```python\nfrom einar import AES\n\nkey = b'' # The key can be any size; it will be padded or truncated to the required length.\n\n# AES-256 CBC example\niv = b'1234567890abcdef' # Required for CBC mode, must be 16 bytes\ncipher = AES(key, keyLen=256, mode=\"CBC\", iv=iv)\n\nmessage = b'Secret message to encrypt'\n```\n\n### Encrypt\n\n```python\nciphertext = cipher.encrypt(message)\nprint(f\"Ciphertext (hex): {ciphertext.hex()}\")\n```\n\n### Decrypt\n\n```python\noriginal_text = cipher.decrypt(ciphertext)\nprint(f\"Original text: {original_text.decode('utf-8')}\")\n```\n\n### Modes\n\n#### ECB (Electronic Codebook)\n\n```python\ncipher = AES(key, keyLen=128, mode=\"ECB\")\nciphertext = cipher.encrypt(message)\noriginal_text = cipher.decrypt(ciphertext)\n```\n\n#### CBC (Cipher Block Chaining)\n\n```python\niv = b'1234567890abcdef' # 16 bytes\ncipher = AES(key, keyLen=256, mode=\"CBC\", iv=iv)\nciphertext = cipher.encrypt(message)\noriginal_text = cipher.decrypt(ciphertext)\n```\n\n### CLI\n\nEinar includes a command-line interface for encryption and decryption:\n\n```bash\neinar -e \"Secret message\" -kl 256 -m CBC\n```\n\n### License\n\nDistributed under [GPL v2 or later](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).\n\n### Author\n\nJuan\n",
"bugtrack_url": null,
"license": "GPLv2 license",
"summary": "Python3 password manager library.",
"version": "2.0.0",
"project_urls": {
"Bug Reports": "https://github.com/juanbindez/einar/issues",
"Homepage": "https://github.com/juanbindez/einar",
"Read the Docs": "http://einar.readthedocs.io/"
},
"split_keywords": [
"password",
" manager",
" tools",
" cli",
" pass"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "83facbc5f1c23718f4099a918b09ea06e1582802a921830b0831a555a7abd125",
"md5": "3a43dbb1bc702a2596fa8bc6a2906c92",
"sha256": "580042dd266116f6b30a79b1b98a0d7c86da874c388c36a622df8d68361bc849"
},
"downloads": -1,
"filename": "einar-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3a43dbb1bc702a2596fa8bc6a2906c92",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 16016,
"upload_time": "2025-08-10T22:31:06",
"upload_time_iso_8601": "2025-08-10T22:31:06.826711Z",
"url": "https://files.pythonhosted.org/packages/83/fa/cbc5f1c23718f4099a918b09ea06e1582802a921830b0831a555a7abd125/einar-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "01cc28b95c27ce0afa149acfe1ae4d7d8f3fc784b9f3711c9217fd3cde2a658f",
"md5": "f5db6480f7cecb2c79e65c90956719e2",
"sha256": "74c09bb62792d92ea51b3f20cdff298214f202589a159707b2c5da7cfd207bc1"
},
"downloads": -1,
"filename": "einar-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "f5db6480f7cecb2c79e65c90956719e2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 15458,
"upload_time": "2025-08-10T22:31:08",
"upload_time_iso_8601": "2025-08-10T22:31:08.337457Z",
"url": "https://files.pythonhosted.org/packages/01/cc/28b95c27ce0afa149acfe1ae4d7d8f3fc784b9f3711c9217fd3cde2a658f/einar-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-10 22:31:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "juanbindez",
"github_project": "einar",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "einar"
}