Encryption and Emojis!

Encryption and Emojis!

Encrypt text in the form of emojis and decrypt them back with the help of Cryptmoji


1 min read

Almost nine months ago, I published my 3rd Python library - Cryptmoji. You may have come across a ton of cryptography libraries on PyPI. Many may be relatively safer, but I aimed to use "Caesar Cipher" and "mapping" to make a fun tool to learn cryptography. To install Cryptmoji, run the following:

pip install cryptmoji

How to use Cryptmoji


To encrypt text, we use the encrypt() function.

>>> from cryptmoji import encrypt
>>> text = "H3LL0 W0RLD"
>>> encrypted = encrypt(text)

The output is much different than the regular encryption algorithms, isn't it?


To decrypt text, we use the decrypt() function.

>>> from cryptmoji import decrypt
>>> encrypted = "๐ŸŒพ๐ŸŒœ๐Ÿ‚๐Ÿ‚๐ŸŒ™๐ŸŒ‰๐Ÿ๐ŸŒ™๐Ÿˆ๐Ÿ‚๐ŸŒบ"
>>> decrypt(encrypted)

And Voila! We have our string back!

using the Key parameter

As you can see, the output starts to become predictable after some time. So we need another parameter to shuffle the characters. This Parameter is key. This will drastically change the encrypted string.

For example:

>>> from cryptmoji import encrypt, decrypt
>>> key = "HI_M0M"
>>> encrypted = encrypt("H3LL0 W0RLD", key=key)
>>> encrypted
>>> decrypt(encrypted, key=key)

For more details, refer to the documentation and GitHub repo.