No project description provided
Project description
Crypto-glTF
This package implements adaptive, hierarchical encryption and decryption of 3D .glTF or .glb files.
The package is only suported for a Linux OS, for alternative architectures, please recompile the C function DLL, or contact will@loci.ai for support.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crypto_gltf-0.1.14.tar.gz.
File metadata
- Download URL: crypto_gltf-0.1.14.tar.gz
- Upload date:
- Size: 48.0 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 |
661c9cd57cf3da389b4c919ffb78a7fc22fae230cfda190c72d70f3ad76a8afa
|
|
| MD5 |
297ad10b331ab7dc8791be60035cafd8
|
|
| BLAKE2b-256 |
46ca8ffbf0e72cbcd730373d543f519ee317ab473a897e9658e6d8180fbac40d
|
File details
Details for the file crypto_gltf-0.1.14-py3-none-any.whl.
File metadata
- Download URL: crypto_gltf-0.1.14-py3-none-any.whl
- Upload date:
- Size: 71.5 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 |
5d3e38b48a2b8c649643482b24e8b55162eb7170e9d1ed28cb48d305798536d8
|
|
| MD5 |
a157b8e5dc520c771f2f8c322b537191
|
|
| BLAKE2b-256 |
282308508b39acac4a091de42dff25266e78aecd5fa2480c89ebd4751b7f1e2e
|