Metadata-Version: 2.4
Name: sweecrypt
Version: 1.1.5
Summary: An easy and fun encryption module.
Author-email: Swee <meow@swee.codes>
License: MIT
Project-URL: Homepage, https://swee.codes/apps/sweecrypt
Project-URL: Repository, https://git.swee.codes/SweeZero/SweeCrypt
Project-URL: Issues, https://git.swee.codes/SweeZero/SweeCrypt/issues
Project-URL: Changelog, https://git.swee.codes/SweeZero/SweeCrypt/releases
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer
Requires-Dist: typing-extensions
Dynamic: license-file

# SweeCrypt
A basic and fun cipher module for everyone. it converts regular text into symbols on a keyboard, kind of like a cipher. This is only for fun, using this module for cybersecurity is NOT ADVISED

This is a more maintained version of the Crypty Encryption Module in Swee's Replit.

# Install

## CLI (>= 1.1.3)

```shell-session
$ pipx install sweecrypt
```

Help page:
```shell-session
$ sweecrypt --help
                                                                                                                                                                     
 Usage: sweecrypt [OPTIONS] COMMAND [ARGS]...                                                                                                                        
                                                                                                                                                                     
 An easy and fun encryption module.                                                                                                                                  
                                                                                                                                                                     
                                                                                                                                                                     
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.                                                                                           │
│ --show-completion             Show completion for the current shell, to copy it or customize the installation.                                                    │
│ --help                        Show this message and exit.                                                                                                         │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ encrypt   Encrypts a message                                                                                                                                      │
│ decrypt   Decrypts a SweeCrypt-encoded message                                                                                                                    │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

```

## Module

```shell-session
$ pip3 install sweecrypt
```

Import:  
```python
>>> import sweecrypt
```

# Usage

Encrypt:  
```python
>>> sweecrypt.encrypt("hello, world!")
!?~~(:,}(>~/a
```
```shell-session
$ sweecrypt encrypt "hello, world!"
!?~~(:,}(>~/a
```

Decrypt:  
```python
>>> sweecrypt.decrypt("!?~~(:,}(>~/a")
hello, world!
```
```shell-session
$ sweecrypt decrypt "!?~~(:,}(>~/a"
hello, world!
```

> [!WARNING]
> Decrypting text using the CLI may cause your shell to malfunction
>
> This can usually be fixed by using `set +H` before running or by piping instead

With newer versions of sweecrypt (>= 1.1.0), you can shift the encryption database:

```python
>>> sweecrypt.encrypt("hello, world", 3)
'\\!((>ba_>](#'
>>> sweecrypt.decrypt("\\!((>ba_>](#", 3)
'hello, world'
```
```shell-session
$ sweecrypt encrypt --shift 3 "hello, world"
\!((>ba_>](#
$ sweecrypt decrypt --shift 3 "\!((>ba_>](#"
hello, world
```

So it will output a nonsense string if shifted incorrectly.

```python
>>> sweecrypt.decrypt("\\!((>ba_>](#")
'khoor?!zruog'
```
```shell-session
$ sweecrypt decrypt "\!((>ba_>](#"
khoor?!zruog
```

In SweeCrypt >= 1.1.5, you can now pipe to the CLI

```shell-session
$ cat test.txt
Lorem ipsum dolor
$ xxd -p test.txt | sweecrypt encrypt > test.swcr
$ cat test.swcr
j)l^mhlkl/hplompmimkl/hpljl^l)l^mhp`c
$ sweecrypt decrypt < test.swcr | xxd -rp
Lorem ipsum dolor
```
