Skip to main content

No project description provided

Project description

Crypto-glTF

This package implements adaptive, hierarchical encryption and decryption of 3D .glTF or .glb files It is suppprted for Python3.10 and above.

Quickstart

Install:

pip install crypto-gltf

Loading a .gltf or .glb file:

from crypto_gltf import Asset

filepath = 'example/path/to/an/asset.glb'
asset = Asset.load(filepath)

Encrypting an asset:

encryption_response = asset.encrypt()

Exporting an encrypted asset:

save_directory = 'example/save/directory'
export_path = asset.save(save_directory)

Accessing encryption keys:

encryption_key = encryption_response.key
k1 = key.k1
k2 = key.k2
k3 = key.k3

Decrypting an asset:

Here k3 can be replaced by k1 or k2.

encrypted_asset = Asset,load(export_path)
encrypted_asset.decrypt(
    k3=encryption_response.key.k3,
)
encrypted_asset.save(save_directory)

Advanced Usage:

Encrypting images:

mesh_and_image_encryption_response = asset.encrypt(encrypt_images=True)

Configuring parameters:

configured_encryption_response = asset.encrypt(
    meshes_cipher_params=(1, 3, 10), #(p,q,r)
    images_cipher_params=(1, 1, 6), #(p,q,r)
    encrypt_images=True,
)

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

crypto_gltf-0.1.10.tar.gz (164.5 kB view details)

Uploaded Source

Built Distribution

crypto_gltf-0.1.10-py3-none-any.whl (67.2 kB view details)

Uploaded Python 3

File details

Details for the file crypto_gltf-0.1.10.tar.gz.

File metadata

  • Download URL: crypto_gltf-0.1.10.tar.gz
  • Upload date:
  • Size: 164.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-41-generic

File hashes

Hashes for crypto_gltf-0.1.10.tar.gz
Algorithm Hash digest
SHA256 e198a92913a35e698456fedc2056e0cc624963731934b4dbd23166b66deb94d0
MD5 f02e954ab3613fa023213e8d9b75e85e
BLAKE2b-256 2be3e35aa2c2b245a3f19c9ff12f3c9179cd944dfe62508376b3bf16f7765853

See more details on using hashes here.

File details

Details for the file crypto_gltf-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: crypto_gltf-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 67.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-41-generic

File hashes

Hashes for crypto_gltf-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 aa9e2cdc0953a1ac4fa44e34a91a94438ecb8d62f2ad64ceef9e3d5a4e14d553
MD5 f09cf9a3ff6419f91a3d634907d5e445
BLAKE2b-256 7fb74c50300b4aa1a4dfcdfd7e3b9ca9def1371977b8f090e2677d5ff9bef480

See more details on using hashes here.

Supported by

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