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.4.tar.gz (4.4 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.4-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ms_ovba_crypto-1.0.4.tar.gz
  • Upload date:
  • Size: 4.4 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.4.tar.gz
Algorithm Hash digest
SHA256 d775f1b78ea7a002bfaeed8e25b97860923f45ccf733b3f52b1748cc3c68a3ea
MD5 1de9ff8a52b216e50e109f648da7404a
BLAKE2b-256 26bcde2ca097c07b0c402a35bb8e50eadd8ca696972b216b05af0cb9c3996812

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ms_ovba_crypto-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.0 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 34c9696183cfcba79645eead31ba1bf16766602284b930d7b620f94b5cb4e73e
MD5 8f5f33d514e8ddea2659a3c099c4f3a4
BLAKE2b-256 8c9ed65e66f5ff7f7b985c00160bde35519ba6ae38c4195ad7fac088fb5025a2

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