ara_v7 / README.md
QomSSLab's picture
Upload README.md with huggingface_hub
b649184 verified
---
language: [fa]
license: other
multilingual: false
pretty_name: encrypted_legal_dataset
task_categories: [other]
task_ids: []
source_datasets: []
---
# ara_v7
**ara_v7** is a dataset where the `text` column has been encrypted with **AES-GCM (AES-256)**
to preserve privacy while still allowing distribution.
## Dataset Description
- **Columns**:
- `score`: floating-point metadata value
- `text`: Base64-encoded string containing AES-GCM encrypted text
- **Encryption**:
- AES-256 in GCM mode
## Usage
You can load the dataset using the ๐Ÿค— Datasets library:
```python
import base64
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from datasets import load_dataset
# ๐Ÿ”‘ Replace this with the Base64 key provided securely
key_b64 = "PASTE-YOUR-KEY-HERE"
key = base64.b64decode(key_b64)
aesgcm = AESGCM(key)
def decrypt(token: str) -> str:
data = base64.b64decode(token.encode())
nonce, ciphertext = data[:12], data[12:]
return aesgcm.decrypt(nonce, ciphertext, None).decode()
# Load dataset
dataset = load_dataset("QomSSLab/ara_v7")
# Decrypt rows
dataset = dataset.map(lambda x: {key: decrypt(x[key]) for key in ['AnonymizedJudge_text','AnonymizedJSS_text', 'UniqueTables', 'UniqueItemArray','JSSType','othersdoc']})
```