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.13.tar.gz
(47.8 kB
view details)
Built Distribution
File details
Details for the file crypto_gltf-0.1.13.tar.gz
.
File metadata
- Download URL: crypto_gltf-0.1.13.tar.gz
- Upload date:
- Size: 47.8 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 | ffa333269e57070758c4603b14f35ecb39338f68b59dce0305abb8c4de352558 |
|
MD5 | bf9e0bebebf36e32e3223e063feb4e08 |
|
BLAKE2b-256 | ff34d7372f995588e40fb902d2c8facb83c46b2f8b228246c4f5ca15963071cd |
File details
Details for the file crypto_gltf-0.1.13-py3-none-any.whl
.
File metadata
- Download URL: crypto_gltf-0.1.13-py3-none-any.whl
- Upload date:
- Size: 71.3 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 | 2ec5b47e16abb084b5a504889c133bba48bb7c3ed15b233fc6969320ce5840b4 |
|
MD5 | 984ddb869fc54153a268bddf8d3733b9 |
|
BLAKE2b-256 | c3e354446711185540e63400cfd4966453b93e841ddc9a16af2cda8337c995fa |