MS-OVBA-Crypto
Cryptographic Functions for Office Visual Basic files.
Installation
Use the package manager pip to install MS_OVBA_Compression.
pip install ms_ovba_crypto
Usage
Microsoft VBA files use a custom encryption algorithm to obfuscate visibility and permission fields. The clsid is used as a seed.
from ms_ovba_crypto import MsOvbaCrypto
data = b'\x00\x00\x00\x00',
clsid = '{9E394C0B-697E-4AEE-9FA6-446F51FB30DC}'
# Random numbers are used in the obfuscation, so the output is not deterministic.
encrypted = MsOvbaCrypto.encrypt(clsid, data)
data = b'\x41\x43\x5A\x5A\x5E\x5A\x5E\x5A\x5E\x5A\x5E'
# returns b'\x00\x00\x00\x00'
MsOvbaCrypto.decrypt(data)
Typing stubs
The project also includes typed stubs for mypy. These stubs are autogenerated by stubgen, so they may be incomplete. Please let me know if they do not meet your needs and I can manage them manually.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Metadata
Release files for ms-ovba-crypto 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ms_ovba_crypto-2.0.1.tar.gz | 4.7 kB | Without provenance | Details for ms_ovba_crypto-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ms_ovba_crypto-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for ms_ovba_crypto-2.0.1-py3-none-any.whl |
Total release size: 9.6 kB
Release files / ms_ovba_crypto-2.0.1.tar.gz
| Download URL | ms_ovba_crypto-2.0.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1bfced6bfab8a41a64a285156a67cf67e861de32fe402d5f4689ec311a5d3c58
|
|
BLAKE2b-256 checksum How to use checksums |
b8e2fdfee0d5749833081fb1b00d1e4aad8f6d7a6b6264b46d7ad7b116d246ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / ms_ovba_crypto-2.0.1-py3-none-any.whl
| Download URL | ms_ovba_crypto-2.0.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0ab57b4494368c32154d7302a06529a5f0207d795f786fba4ae1289cc949e4d
|
|
BLAKE2b-256 checksum How to use checksums |
a006ea8aeb1b121f63ff530f7398dd67300a0e01763e2f47cc7c3104f2fce666
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for ms-ovba-crypto 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.