Encryption and hashing functions for Office VBA files.
Project description
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.
import ms_ovba_crypto
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 = ms_ovba_crypto.encrypt(clsid, data)
data = b'\x41\x43\x5A\x5A\x5E\x5A\x5E\x5A\x5E\x5A\x5E'
# returns b'\x00\x00\x00\x00'
ms_ovba_crypto.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
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
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 ms_ovba_crypto-1.0.3.tar.gz.
File metadata
- Download URL: ms_ovba_crypto-1.0.3.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8cc21ab71596b1c2f8d8a62caa360fc61619fcd5c7d6cd21d2fa8c45372a039
|
|
| MD5 |
c7fa4a28a42caf6f4ee0b1b999c78c35
|
|
| BLAKE2b-256 |
a2e63a420a2de51a228437b9f24ce14d02449f6c48241358e82a2716fcfb1ce2
|
File details
Details for the file ms_ovba_crypto-1.0.3-py3-none-any.whl.
File metadata
- Download URL: ms_ovba_crypto-1.0.3-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
818a7103674e0a0458d7bec0ceebff94f0b2ffc76a944e8545dc0572723eb7e9
|
|
| MD5 |
83d472a7334682bdeb866277052f9223
|
|
| BLAKE2b-256 |
137043c07de29c1874119a6ee08d0842f770c21186c4d291af512cd26169dc37
|