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
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
crypto_gltf-0.1.12.tar.gz
(43.9 kB
view details)
Built Distribution
File details
Details for the file crypto_gltf-0.1.12.tar.gz
.
File metadata
- Download URL: crypto_gltf-0.1.12.tar.gz
- Upload date:
- Size: 43.9 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f069f8976f2f4c94d3180060445646257fb743cf81ae59a00c19cb3a728a1d83 |
|
MD5 | 009532169f501e83bceabe58940454b1 |
|
BLAKE2b-256 | fe0c06faf6e0053626bfd9c264f335b413d7e520501962259d7069ccb2e2d8c0 |
File details
Details for the file crypto_gltf-0.1.12-py3-none-any.whl
.
File metadata
- Download URL: crypto_gltf-0.1.12-py3-none-any.whl
- Upload date:
- Size: 67.4 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b0ee4d0f0056a1647dbb9defe48221bca34232b73bdfe158b292660c893b505 |
|
MD5 | 42a1bcd2e167c5f18c320e5ad879f3cf |
|
BLAKE2b-256 | 3994f39ea2d7336afea605d26bf4f76eef95de50b00c5269ab95ceb906b51318 |