Skip to main content

egter-py

  1. Egor Ternovoy. 2020

!!! NOT SO SAFE! It is possible to reverse calculate source bytes from hash! !!!

Uses library random

Documentation can be found here.

Usage:

import egter

# ------- hashing -------

hash = egter.hash.EHash(b'some bytes', lenght=32, iterations=100)  # lenght - bytes count

print(hash) # equal to hexdigest method
# 90b0f287805156865bfebbf93eac3328ab0e9bcbb82dfcc9d5f88d6d41524766

print(hash.digest()) # bytes
# b'\x90\xb0\xf2\x87\x80QV\x86[\xfe\xbb\xf9>\xac3(\xab\x0e\x9b\xcb\xb8-\xfc\xc9\xd5\xf8\x8dmARGf'

print(hash.hexdigest())
# 90b0f287805156865bfebbf93eac3328ab0e9bcbb82dfcc9d5f88d6d41524766

print(hash.intdigest())
# 65445689155113512790458496256639542022557958647760937310771143133228635932518

hash.update(b'add bytes to hash')
print(hash.hexdigest())
# 591822f89a114ede35c8ac4a4ebeda6952fd6f4114a9434ebe27b1b8fc6b0d2a

# set custom seed
hash.generate(b'some seed')
print(hash.hexdigest())
# a2c401e4e18b0ebda141fd63da4a0efbc9253b9d204e6c24381b9bd45ec4abc1

hash2 = egter.hash.EHash(int) # equal to egter.EHash('<class 'int'>')
print(hash)
# a7eb7705b8a37e77df4a48882584b4bcfa20377b305bdae586784636be9ba255

custom_hash = egter.hash.EHash('custom hash', custom=(1, 2, 3), custom_type=str) # custom_type = str|bytes,
                                                                           #custom = iterable type
print(custom_hash.customdigest())
# 11321321121122112121111133122213


# ------- steganographing -------

s = egter.crypt.steganography.Steganography(egter.crypt.steganography.defaults.steganography_list)
enc = s.encode(b'some bytes')
dec = s.decode(enc)
print(enc, dec)
# Viverra facilisisu eue nisla elita nisio luctuso litorae, nisla; viverra b'some bytes'


# ------- encrypting -------

# Enigma
e = egter.enigma.Enigma(egter.enigma..generate_configuration(b'pass'), b'pass')
enc = e.encode(b'hello')
dec = e.decode(enc)
print(enc, dec)
# b'\\xa7G&\\x1cP' b'hello'

# Random encryption
e = egter.enigma.RandomCrypt(b'pass')
enc = e.encode(b'text')
dec = e.decode(enc)
print(enc, dec)
# b'\\x07^\\x1b\\r' b'text'


# ------- customs -------
list = egter.customs.List
l = list([1,2,3])
# equal to dict.get
l.get(2)
# 3
l.get(3)
# None
l.get(3, 'not found')
# not found
l.get(3, 45)
# 45

Metadata

Release files for egter 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for egter 0.3.4
File Size Uploaded Provenance Actions
egter-0.3.4.tar.gz 10.4 kB Without provenance Details for egter-0.3.4.tar.gz

Release files / egter-0.3.4.tar.gz

Download URL egter-0.3.4.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7b7abd5417c49bf8e265ac7593987aaca0670c861ee32694ed11d8334315535f
BLAKE2b-256 checksum
How to use checksums
52bb6bb9b078e72dca5ffa5c0d566bb411c8aac4c853d1c264ccf9b0c257f58f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

Security for egter 0.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page