Skip to main content

Encryption and hashing functions for Office VBA files.

Project description

Coverage Status Build Status

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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ms_ovba_crypto-1.0.5.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ms_ovba_crypto-1.0.5-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file ms_ovba_crypto-1.0.5.tar.gz.

File metadata

  • Download URL: ms_ovba_crypto-1.0.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for ms_ovba_crypto-1.0.5.tar.gz
Algorithm Hash digest
SHA256 06fdadab6f9e525555aaeacc4f4df268e419fcd251d63bc506c1b543f19d9570
MD5 ae1544efaf62f49f429a1c8ceb8cbf47
BLAKE2b-256 5b106742b883af06a1331e91536f26b8aa127ff6944e09706db9126318fb6a85

See more details on using hashes here.

File details

Details for the file ms_ovba_crypto-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: ms_ovba_crypto-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for ms_ovba_crypto-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f00114e54f4eb0a25e4d46e86f03a319cc20065cb9a002ad3e09a59df0916677
MD5 df5d359b827e9028105b08642d28ba52
BLAKE2b-256 ab0a7819824abb5b96b46b84c543f74b30c603f16243b3ef58785bd01e597f91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page