Skip to main content

bencrypt.py

bencrypt is a python module for simple cipher-style encyption.

Installation Guide

Coming Soon

Different functions:

  • moveCharacter(character, shift) - This function takes a letter and moves it 'shift' places down the list of accepted characters (at the bottom) it returns the character at the index of 'character's index' + shift.

  • moveStringSame(string, shift) - This function takes a string and moves all of its characters an equal amount down the list of accepted characters. It will return a string where each letter is shift places from each letter in the original string.

  • moveStringDiff(string, shiftList) - This function takes a string and a list of numbers, each number corresponds to a character in the string. For example it gets string[0] and moves it shiftList[0] places.

  • encryptWithPass(toEncrypt, password) - This function is just moveStringDiff but it accepts two strings and converts the second one (password) into the list of numbers in order to encrypt toEncrypt. The whole point of this "Encryption" is so you can only decrypt your password (or any string) using a master password.

  • decryptWithPass(toDecrypt, password) - This function is encryptWithPass but the password's corresponding number list gets reversed (each number multiplied by -1) in order to decrypt toDecrypt.

Other Minor Functions

  • condenseList(list) just gets every item in a list and condenses it into a string.

  • stringToNumberList(string) takes the string, converts it into a list and finds the index of every character in that list on the accepted character list.

  • negateList(list) takes each value in the list and multiplies them by -1

SPECIAL MENTIONS!

  • for i in range(0, len(list)) this has been my best friend so i can loop through a list and perform a function on each individual items in a list

  • list(string) this has been super useful for splitting a string into a list, to perform a function on each character, then use condenseList to put it back into a string

  • modulo!! this lets me loop the indexes in the list. For example if I need to shift a character at the end of the list, it just loops back to the start when it gets to the end. This was the code I wrote to do that: return(CHARACTERS[(shift % len(CHARACTERS) + CHARACTERS.index(character)) % len(CHARACTERS)])

Extra Notes

This is my first proper python project and I'd appreciate any feedback on this!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bencrypt-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

bencrypt-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file bencrypt-0.1.0.tar.gz.

File metadata

  • Download URL: bencrypt-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for bencrypt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 945c1003a26b9ab90d57c0d124a1db859104c8c3878510cf8989c592bd536c36
MD5 43d455cd78d60ee804e12075d5cfe0fc
BLAKE2b-256 688f0ac26d1ac8e44744bef13c02e893edfbd0beb409fa262709078907336063

See more details on using hashes here.

File details

Details for the file bencrypt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bencrypt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for bencrypt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99bd2cf564cd2b02dfc834d50c08877689432d15655425c7df0a8118c0a73b76
MD5 62dd6f1ba5a66a9734ea55d775bac246
BLAKE2b-256 3f386dba80632fac3c8a6b907c8c61bca3e45593989f90b078fc62b05b5a183a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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