@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:
- add
- sub
- mul
- div
- power
- Binary.binary
- Binary.debinary
- Serializable.serialize
- 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!
Release files for BinaryAndSerializableMath 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| binaryandserializablemath-1.0.1.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| BinaryAndSerializableMath-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / binaryandserializablemath-1.0.1.tar.gz
| Download URL | binaryandserializablemath-1.0.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f786cee51ae8e34fadd7ab2bba90a2b2f37496ec8ab6607b14ef854853bc41d3
|
|
BLAKE2b-256 checksum How to use checksums |
9650d67048edac350aad7a7dd743418b989bd0e931cf26648d756c9cccae4a76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / BinaryAndSerializableMath-1.0.1-py3-none-any.whl
| Download URL | BinaryAndSerializableMath-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9253514c17c447fc742d04c49f5358df81762b77316398a94a1ca59965546ac9
|
|
BLAKE2b-256 checksum How to use checksums |
f6747caaa692c2c87d7784070af1f6bc9f054f3b6089dafa497099cd6022d397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|