Skip to main content

No project description provided

Project description

@COPYRIGHT 2024 By Kyfstore

How To Use

This is the tutorial on how to use BinaryAndSerializableMath package for python. Like in the name, this package is a simple math package but also includes a Binary and Serializable class that allows you to convert integers, and strings to and from binary as well as convert binary to and from a custom serializable alphabet that can only use the package to crack. Note: Serializable class only supports lowercase letters. Any fancy chars, numbers, or punctuation will break it such as 78, {}, [], ., or !. This package goes great along with RedVert which is a package I also made as well! RedVert is used to create files with custom extensions so you can create a very secure file will a lowercase-letter only password such as cookiesaregreat by first converting them binary and them the custom serializable alphabet and them back again. I will teach you the very basics of it.

Python Use

To use this package in python, you first need to know the main functions which are:

  1. add
  2. sub
  3. mul
  4. div
  5. power
  6. Binary.binary
  7. Binary.debinary
  8. Serializable.serialize
  9. Serializable.deserialize

The first 5 are simple ones for addition, subtraction, multiplication, division, and powers. The last 4 are the actual fun, main functions. Binary.binary can convert a int (integer) or str (string) into a binary representation. One use could be:

from binaryandserializeablemath import *

pic = Binary.binary("Python Is Cool")

This short script will return the binary representation of, "Python Is Cool" into a variable called pic (short for Python Is Cool). Also, with this same idea, you can convert from binary. So it would look something like:

from binaryandserializeablemath import *

picBinary = Binary.binary("Python Is Cool")
picDebinary = Binary.debinary(picBinary)
print(picDebinary)

This script will store a variable called picBinary for storing the binary of Python Is Cool and the variable picDebinary will store the variable of converting the binary back into a string and later printing the output which should be:

Python Is Cool

Next, is the Serializable class. First is the Serializable.serialize function. To use it, you need two arguments, the input, either a string or integer, and the type of serialization you want to do, either use, "t" or "n". N for numbers and T for text. An example of both are below:

from binaryandserializeablemath import *

picSer = Serializable.serialize("python is cool", "t")
from binaryandserializeablemath import *

numSer = Serializable.serialize(190, "n")

The last function is Serializable.deserialize which by the name, you should now it will deserialize a previously serialized variable. And once again, it requires two arguments, the input and type of serialization. Below is once again two examples:

from binaryandserializeablemath import *

picSer = Serializable.serialize("python is cool", "t")
picDeSer = Serializable.deserialize(picSer, "t")
print(picDeSer)
from binaryandserializeablemath import *

numSer = Serializable.serialize(190, "n")
numDeSer = Serializable.deserialize(numSer, "n")
print(numDeSer)

That was the current basics of the basm (short for binaryandserializablemath). That's it, Bye!

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

binaryandserializablemath-1.0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

BinaryAndSerializableMath-1.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file binaryandserializablemath-1.0.1.tar.gz.

File metadata

File hashes

Hashes for binaryandserializablemath-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f786cee51ae8e34fadd7ab2bba90a2b2f37496ec8ab6607b14ef854853bc41d3
MD5 4f5af7decb554fc0651ae1052be0c609
BLAKE2b-256 9650d67048edac350aad7a7dd743418b989bd0e931cf26648d756c9cccae4a76

See more details on using hashes here.

File details

Details for the file BinaryAndSerializableMath-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for BinaryAndSerializableMath-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9253514c17c447fc742d04c49f5358df81762b77316398a94a1ca59965546ac9
MD5 d746722ab86e84b28e2fe361f4b10676
BLAKE2b-256 f6747caaa692c2c87d7784070af1f6bc9f054f3b6089dafa497099cd6022d397

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