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)

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.1.tar.gz (4.2 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.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ms_ovba_crypto-1.0.1.tar.gz
  • Upload date:
  • Size: 4.2 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.1.tar.gz
Algorithm Hash digest
SHA256 cd9caced8ada3b07e7131a1b7bdf68c2567547d62f8d309ae0f95facf1ee2a28
MD5 b9f0cbb506e2d05b24ff8a30c2160453
BLAKE2b-256 42da1bc0214e64663100edecf18932ad42b9d04980e58f0de6873352df0395e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ms_ovba_crypto-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a22ea2cd207d959ff123cd485d0a306f1b6990388b0d4b54cc8dd2aa0e25184b
MD5 475e63fb0231d308442223fcec1896c0
BLAKE2b-256 fd8df8ecd16f19ae06db714042d8e6defe7a55284dd9e4656c9a8a0b5f8d3889

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