Skip to main content

Basic crypto primitives, not intended for actual use, but as a companion to --Criptografia, Métodos e Algoritmos--

Project description

TransCrypto

Basic crypto primitives, not intended for actual use, but as a companion to "Criptografia, Métodos e Algoritmos".

Started in July/2025, by Daniel Balparda. Since version 1.0.2 it is PyPI package:

https://pypi.org/project/transcrypto/

License

Copyright 2025 Daniel Balparda balparda@github.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License here.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Use

Install

To use in your project just do:

pip3 install transcrypto

and then from transcrypto import transcrypto for using it.

TODO

TODO: explain module...

Development Instructions

Setup

If you want to develop for this project, first install Poetry, but make sure it is like this:

brew uninstall poetry
python3.11 -m pip install --user pipx
python3.11 -m pipx ensurepath
# re-open terminal
poetry self add poetry-plugin-export@^1.8  # allows export to requirements.txt (see below)
poetry config virtualenvs.in-project true  # creates venv inside project directory
poetry config pypi-token.pypi <TOKEN>      # add you personal project token

Now install the project:

brew install python@3.13 git
brew update
brew upgrade
brew cleanup -s
# or on Ubuntu/Debian: sudo apt-get install python3.13-venv git

git clone https://github.com/balparda/transcrypto.git transcrypto
cd transcrypto

poetry env use python3.13  # creates the venv
poetry install --sync      # HONOR the project's poetry.lock file, uninstalls stray packages
poetry env info            # no-op: just to check

poetry run pytest -vvv
# or any command as:
poetry run <any-command>

To activate like a regular environment do:

poetry env activate
# will print activation command which you next execute, or you can do:
source .env/bin/activate                         # if .env is local to the project
source "$(poetry env info --path)/bin/activate"  # for other paths

pytest

deactivate

Updating Dependencies

To update poetry.lock file to more current versions:

poetry update  # ignores current lock, updates, rewrites `poetry.lock` file
poetry run pytest

To add a new dependency you should:

poetry add "pkg>=1.2.3"  # regenerates lock, updates env
# also: "pkg@^1.2.3" = latest 1.* ; "pkg@~1.2.3" = latest 1.2.* ; "pkg@1.2.3" exact
poetry export --format requirements.txt --without-hashes --output requirements.txt

If you added a dependency to pyproject.toml:

poetry run pip3 freeze --all  # lists all dependencies pip knows about
poetry lock     # re-lock your dependencies, so `poetry.lock` is regenerated
poetry install  # sync your virtualenv to match the new lock file
poetry export --format requirements.txt --without-hashes --output requirements.txt

Creating a New Version

# bump the version!
poetry version minor  # updates 1.6 to 1.7, for example
# or:
poetry version patch  # updates 1.6 to 1.6.1
# or:
poetry version <version-number>
# (also updates `pyproject.toml` and `poetry.lock`)

# publish to GIT, including a TAG
git commit -a -m "release version 1.0.2"
git tag 1.0.2
git push
git push --tags

# prepare package for PyPI
poetry build
poetry publish

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

transcrypto-1.0.3.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transcrypto-1.0.3-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file transcrypto-1.0.3.tar.gz.

File metadata

  • Download URL: transcrypto-1.0.3.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for transcrypto-1.0.3.tar.gz
Algorithm Hash digest
SHA256 a78b49c7d1606b297b1503c51bf4700f3c81b9a1bdf8ff6ebd378c95c81a3164
MD5 4c63f3bf1a6ec5571883b7deb48a112f
BLAKE2b-256 2b92ec1718659c0d9573aaa13a910518e673c8d19729ab35c24ea7ea136c0e7a

See more details on using hashes here.

File details

Details for the file transcrypto-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: transcrypto-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for transcrypto-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 81539398cc609a9a446b94ddc55662568ec38d658d360371cf38faccedcb75c0
MD5 f0b0c1a7d2dc374a23f735e06a86c482
BLAKE2b-256 7af06f1e422702454e3d8500b347c3b868f1738fc3412d95c07584f545c1cf91

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