Metadata-Version: 2.5
Name: libfcrypt
Version: 1.1.1
Summary: Simple, symmetric encryption. Courtesy of Fernet.
Project-URL: Homepage, https://www.github.com/SrFluff/libfcrypt
Project-URL: Issues, https://www.github.com/SrFluff/libfcrypt/issues
Author-email: Franco Magnano <fluffins009@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9.1
Description-Content-Type: text/markdown

# LibFcrypt

Simple, symmetric encryption. Courtesy of cryptography and Fernet.

## Functions

### Base

- `base.gen_key()`: Generate a bytes object key.
- `base.passwd_gen_key(passwd)`: Generate a bytes object key derived from a string.
- `base.encrypts(key,string)`: Encrypt a string using a key (bytes), returns a bytes object.
- `base.decrypts(key,string)`: Decrypt a string using a key (bytes), returns a string.

### File

- `file.encryptf(key,filePtr)`: Encrypt the contents of a file using a key (bytes), returns a bytes object.
- `file.decryptf(key,filePtr)`: Decrypt the contents of a file using a key (bytes), returns a string.

## Variables

- `VERSION`: Module version information, string.
- `LICENSE`: Module licensing information, string.

## Installation

Copy the `libfcrypt/` directory to your `$PYTHONPATH` directory, and import it like so:
```python
import libfcrypt

```

## Usage

```python
import libfcrypt

# Generate a key
key = libfcrypt.base.gen_key()

# Encrypt a string
secrets = libfcrypt.encrypts(key,"I have so many secrets muahaha!")

# Write secrets to a file
with open("Secrets.txt","wb") as f:
    f.write(secrets)

# Read secrets from a file

f = open("Secrets.txt","rb")
spilled_secrets = libfcrypt.file.decryptf(key,f)

# Spill secrets!

print(spilled_secrets)
```
