semvec/pypi-packages huggingface dataset:
vault-sync 0.3.3
Synchronization for Hashicorp vault key-value stores
License: MIT
Requires Python: <3.13,>=3.9

# vault-sync #
[![Build Status](https://gitlab.com/solvinity/vault-sync/badges/main/pipeline.svg)](https://gitlab.com/solvinity/vault-sync/pipelines) [![Coverage Status](https://coveralls.io/repos/gitlab/solvinity/vault-sync/badge.svg?branch=HEAD)](https://coveralls.io/gitlab/solvinity/vault-sync?branch=HEAD)

## What is vault-sync? ##

`vault-sync` is a command-line tool for synchronizing secrets from one Hashicorp Vault instance or another.

This can useful either for backup reasons or for ensuring that changes in one environment are correctly brought over to the other.

vault_sync has support for the following authentication methods:
* token
* approle
* kubernetes (experimental)

## Using vault-sync and config file ##

Vault-sync is a command-line tool that by default uses a small JSON document file to connect to the vault instances.

Any file can be used by the tool by using the `--config=<path to file>` flag. Do note however that [`pydantic`](https://pydantic-docs.helpmanual.io/) is used to strictly
enforce the layout of the JSON document.

#### Example configs:

One time sync with token: 

```json
{
    "source": {
        "auth_method": "token",
        "url": "https://test1.com",
        "token": "aabbccddeeff",
        "kv_store": "store1"
    },
    "destination": {
        "auth_method": "token",
        "url": "https://test2.com",
        "token": "0011223344",
        "kv_store": "store2"
    }
}
```

Sync every 5 minutes (with kubernetes and approle auth_methods):

```json
{
    "source": {
        "auth_method": "kubernetes",
        "url": "https://test1.com",
        "token_path": "/run/secrets/kubernetes.io/serviceaccount/token",
        "secret_id": "vrl-vault-sync",
        "kv_store": "store1"
    },
    "destination": {
        "auth_method": "approle",
        "url": "https://test2.com",
        "role_id": "8d900c30-e078-4981-a1be-01c2a0770f2b",
        "secret_id": "d1c5468e-15ee-427f-b69d-b77d214b2bfd",
        "kv_store": "store2"
    },
    "schedule": {
      "every": 300
    }
}
```

(*) approle is the default auth_method, so its fine to remove "auth_method": "approle" from your configuration.
xor-py 1.1
An easy way to use xor in python3
License: MIT
Requires Python: >=3.6
Keywords: python, python xor, xor, encryption

# 🔐 xor.py — Simple XOR Encryption Tool in Python

**Author:** 0xsweat  
**Date:** 2025/05/24

`xor.py` is a lightweight XOR encryption and decryption tool written in Python 3. It features a command-line interface (CLI) for encrypting/decrypting text or files and supports key generation. Ideal for basic data obfuscation, CTF utilities, or educational use.

---

## 📦 Installation

Install via PyPI:

```bash
pip install xor-py
```

Or clone directly from GitHub:

```bash
git clone https://github.com/0xsweat/xor
cd xor
python3 xor.py --help
```

---

## 🚀 CLI Usage

### 🔑 Generate a Key

Create a random key (default: 4096 bytes) and it saves it to `key.txt`:

```bash
python3 xor.py -g
```

Customize key size and output file:

```bash
python3 xor.py -g -ks 2048 -o mykey.txt
```

---

### 🔒 Encrypt or 🔓 Decrypt a File

```bash
python3 xor.py -f input.txt -k key.txt -o output.enc
```

This applies XOR encryption/decryption using the provided key file. The process is symmetric — use the same command to encrypt or decrypt.

---

### ✍️ Encrypt/Decrypt Raw Input

If no input file is given, you'll be prompted to enter the plaintext and key manually:

```bash
python3 xor.py
```

Example prompt:
(The asterik's are there for show, the actual program does not show anything during input.)
```
Text -> ********
Key -> ********
Output file -> result.txt
```

## 📚 Using as a Module

You can also import `xor.py` into other Python scripts:

```python
from xor import xor, keygen

# Generate a 1024-byte key
key = keygen("key.txt", 1024) # outputting the key to a file is optional

# Encrypt a string
encrypted = xor("Hello, world!", "key.txt", key_from_file=True) # grabbing the key from the file

# Decrypt it back
decrypted = xor(encrypted.decode(), key) # using the key from memory
print(decrypted.decode())  # Output: Hello, world!
```

---

## ⚠️ Disclaimer

While `xor.py` uses a simple XOR cipher that is not secure for protecting sensitive or personal data, it has several practical and educational applications. XOR encryption is **symmetric**, **lightweight**, and easy to implement, making it useful for:

- 🧠 Learning about basic encryption principles
- 🛠️ Building custom obfuscation tools
- 🧩 Capture The Flag (CTF) challenges
- 🐞 Debugging or modifying encoded data
- 🔁 Simple reversible transformations

However, it is **not suitable for real-world secure communications or storing confidential information**. For secure encryption, consider using industry-standard libraries such as `cryptography` or `PyNaCl`.

---

## 📄 License

MIT License