semvec/pypi-packages huggingface dataset:
pyminizip 0.2.6
A minizip wrapper - To create a password encrypted zip file in python.
Keywords: zip,file,compress,password,encryption

## pyminizip

To create a password encrypted zip file in python.
And the zip file is able to extract in WINDOWS.

This is a simple Minizip wrapper of python.
(http://www.winimage.com/zLibDll/minizip.html)

This software uses zlib.
License: zlib/libpng License.

## Install
```
$ pip install pyminizip
```

## Install zlib
```
# linux
$ sudo apt-get install zlib
# mac
$ xcode-select --install
$ brew install zlib
```

## How to use

This package just provides three functions.

```
pyminizip.compress("/srcfile/path.txt", "file_path_prefix", "/distfile/path.zip", "password", int(compress_level))
```

  Args:
  1. src file path (string)
  2. src file prefix path (string) or None (path to prepend to file)
  3. dst file path (string)
  4. password (string) or None (to create no-password zip)
  5. compress_level(int) between 1 to 9, 1 (more fast) <---> 9 (more compress) or 0 (default)

  Return value:
  - always returns None

```
pyminizip.compress_multiple([u'pyminizip.so', 'file2.txt'], [u'/path_for_file1', u'/path_for_file2'], "file.zip", "1233", 4, progress)
```

  Args:
  1. src file LIST path (list)
  2. src file LIST prefix path (list) or []
  3. dst file path (string)
  4. password (string) or None (to create no-password zip)
  5. compress_level(int) between 1 to 9, 1 (more fast)  <---> 9 (more compress)
  6. optional function to be called during processing which takes one argument, the count of how many files have been compressed

  Return value:
  - always returns None

```
pyminizip.uncompress("/srcfile/path.zip", "password", "/dirtoextract", int(withoutpath))
```

  Args:
  1. src file path (string)
  2. password (string) or None (to unzip encrypted archives)
  3. dir path to extract files or None (to extract in a specific dir or cwd)
  4. withoutpath (exclude path of extracted)

  Return value:
  - always returns None
safebox 20211220214314
A safe waay to store your Python application credetials

# SAFEBOX
A minimal safe way to store your application credentials.

## DESCRIPTION
This application is build with cython and c/c++ code, this allow us to store a \"super secret key\" to encrypt and decrypt strings, using **AES** algorithm, this allow to store, with a minimum safety, crypted strings, this strings, can be, for ex. users, passwords, address to database connection.

## DEFINE YOUR KEYS!

**IMPORTANT**: This module comes with random keys, but is **EXTREMALLY RECOMENDED** than you compile this module by you own, from sources (*available on github*), to define YOUR UNIQUE secret key on the c/c++ modules.

**IMPORTANT2**: The PRIVATE_KEY **MUST** be 32bytes long (32 chars) and the PRIVATE_IV **MUST** be 16bytes (16 chars) long and ASCII characters.

To define your keys follow the steps:

1. Open the setup.py file
2. On Extensions definitions, inside "define_macros" change values of PRIVATE_KEY and PRIVATE_IV (recommend use of [UUID generator](https://www.uuidgenerator.net/version1) without '-' characters, to generate truly unique keys)

## Install Guides

Once your keys are alrealy defined, you can compile the lib.

1. Install Setuptools, wheels and Cython library
2. If your use venv, activate your enviroment
3. On main directory, run: python setup.py install
4. Ready!

## Usage Example

```
import safebox

message = "test 123 !@#"
crypted = safebox.crypt(message.encode()).decode()
decrypted = safebox.decrypt(crypted.encode()).decode()

print("Message: ", message)
print("Crypted: ", crypted)
print("Decrypted: ", decrypted)

```

### REFERENCES

Encryption algorithm take from: [Encryptions](https://github.com/calccrypto/Encryptions)