Skip to main content

A library that creates a queue and secures it better.

Project description

queueCrypt.

"queueCrypt" is a library that is library that creates a queue and secures it better. Basically this library encrypts the data that is been added to the queue and saves the data securely and safely.

Libraries Needed:

pip install cryptography

this library is needed to encrypt the data. Without this library the library won't work!

How To Call The Library?

from queueCrypt import Queue

To Call The Errors Exceptions Use:

from queueCrypt import ErrorQueueSizeNotValid, ErrorRequestedHigherThanExpected
#----OR----#
from queueCrypt.errors import *

To Call The Encryption Handler Use:

from queueCrypt.ext import Encryption
#----OR----#
from queueCrypt.ext import *

First Thing That Needed Before Using...

from queueCrypt import *

q = Queue(5)
#----OR----#
q = Queue()

Every time that you create the Queue function you can set Queue(number) or use Queue() which will leave the queue with no limit. By setting a number, you set the queue length, that can be changed if you need by using q.change_queue_length(number).

Examples:

  • Let's create a secret input from the user that takes passwords and encrypts them. The user will type the passwords until he will type "quit". After adding them to the queue, print the encrypted list, and the decrypted list.
from queueCrypt import *

q = Queue()

while True:
    user = input("Type passwords: ")
    if user == "quit":
        break
    # When putting the user data you need to convert it to bytes!
    q.put(bytes(user, 'utf8'))

# returns in bytes form.
print(q.get_queue_encrypted())
print(q.get_queue_decrypted())
  • Now let's say that you want to encrypt the data again but after printing the inputted data, you return the encrypted data and delete it.
from queueCrypt import *

q = Queue()

while True:
    user = input("Type passwords: ")
    if user == "quit":
        break

    # When putting the user data you need to convert it to bytes!
    q.put(bytes(user, 'utf8'))
    print(q.get_queue_encrypted()[0].decode())
    # destroys the first element in the queue list with timeout of 0.1.
    q.next_and_destroy(0.1)

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

queueCrypt-0.0.2.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

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

queueCrypt-0.0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file queueCrypt-0.0.2.tar.gz.

File metadata

  • Download URL: queueCrypt-0.0.2.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for queueCrypt-0.0.2.tar.gz
Algorithm Hash digest
SHA256 791c390a3f78eed26543d4b6dec6c9e93c298494f550ffbe30f0b0d1dbeeb77f
MD5 ded0e4fc7153da08e2d9a00cb3dde00d
BLAKE2b-256 6340af1959ce1e7857f9e7742378cd59fc07cb45cc562af0a0a97f2384bbd861

See more details on using hashes here.

File details

Details for the file queueCrypt-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: queueCrypt-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for queueCrypt-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 701b8a7d7d26ddcd14ebbb266a9e6c5a0c39f69cd9e0ce324ee1540b72332d0a
MD5 dd961749bfae539361cb99bccd2f1a62
BLAKE2b-256 2a32e81c757cfcc8f637a765c8ee48da0b9e17488d18221629dd3a7bc392a560

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