https://github.com/yunqing-jia/jmoi_2505c
LaTeX Selective Encryption (Redaction) Package
https://github.com/yunqing-jia/jmoi_2505c
encryption latex-package redaction redaction-and-sensitive-data-protection sensitive-data-security
Last synced: 24 days ago
JSON representation
LaTeX Selective Encryption (Redaction) Package
- Host: GitHub
- URL: https://github.com/yunqing-jia/jmoi_2505c
- Owner: Yunqing-Jia
- License: lppl-1.3c
- Created: 2025-05-07T20:57:44.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-08-10T14:41:28.000Z (2 months ago)
- Last Synced: 2025-08-23T00:56:54.221Z (about 2 months ago)
- Topics: encryption, latex-package, redaction, redaction-and-sensitive-data-protection, sensitive-data-security
- Language: TeX
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JMOI_2505C | ๐ก๏ธ LaTeX Selective Encryption Package
This README.md was generated with the help of ChatGPT.A simple, customizable LaTeX package to selectively **"encrypt" sensitive text or hyperlinks** in your documentโusing asterisks `*`, hashes `#`, or even filled boxes โฎ โ while keeping everything else perfectly readable.
> Want to hide personal data in your PDF before sharing it? Want anonymized previews of confidential content in a paper draft or public submission?
**This package is for you.**
---
## โจ Features
โ Selective encryption of **text** and **hyperlinks**
โ Choose your **encryption style**: asterisk `*`, hash `#`, or filled box `โ `
โ Fully **customizable encryption color**
โ Encryption level can be **turned off** without modifying your source code---
## ๐ฆ Files
- `selective-encryption.sty`: The core package file.
- `test.tex`: A sample document showing how to use the package.
- `test.pdf`: Output from `test.tex`, showing encrypted and unencrypted content side-by-side.---
## ๐ง Installation
Just place `selective-encryption.sty` in the same directory as your `.tex` file, or install it in your local TeX tree.
Then, in your LaTeX document:
```latex
\usepackage[encrypt=2,color=cyan]{selective-encryption}
```---
## ๐ Usage
This package defines two main commands:
- **`\textE{...}`** โ Encrypt regular text.
- This command encrypts regular text in the document.
- The content inside the curly braces will be replaced by the encrypted symbol based on the chosen encryption types.
- **Example**:
```latex
\textE{Encrypted text example}
```
- With `encrypt=1`, this would display as `**********`.- **`\linkE{}{}`** โ Encrypt hyperlink display text or URL.
- This command encrypts the hyperlink's display text or the URL itself.
- It works similarly to the `\textE{...}` command but for links.
- **Example**:
```latex
\linkE{https://github.com/}{Github}
```
- With `encrypt=2`, the output will display as `######` in place of the link text, while also masking the URL.### ๐ข Encryption Types
You can switch encryption types using the encrypt option:
| `encrypt` | Effect | Appearance Example |
|-----------|--------------------------------|--------------------------|
| `0` | No encryption | `@Github` |
| `1` | Encrypted with `*` symbols | `*******` |
| `2` | Encrypted with `#` symbols | `#######` |
| `3` | Encrypted with filled boxes `โ ` | `โ โ โ โ โ โ โ ` |> โน๏ธ The number of symbols matches the number of characters in the original string.
### ๐จ Color
Use the color option to change the encryption symbol color:
```latex
\usepackage[encrypt=3,color=blue]{selective-encryption}
```
### ๐งช Example```latex
\documentclass{article}
%\usepackage[encrypt=0,color=black]{selective-encryption} % default value - no encryption
%\usepackage[encrypt=1,color=cyan]{selective-encryption} % encrypt = 1 : encrypted by *
%\usepackage[encrypt=2,color=cyan]{selective-encryption} % encrypt = 2 : encrypted by #
\usepackage[encrypt=3,color=cyan]{selective-encryption} % encrypt = 3 : encrypted by โ\begin{document}
\section{Latex Selective Encryption Package}
\subsection{No encryption}
\textbf{$@$JMOI\_2505C Project}
\href{https://github.com/}{Github}
\subsection{With encryption}
\textbf{\textE{$@$JMOI\_2505C Project}}
\linkE{https://github.com/}{Github}
\end{document}
```- Compile this with XeLaTeX to see the difference.
---
## ๐ Repository Structure
```
Latex-Selective-Encryption-Package/
โ
โโโ selective-encryption.sty % The encryption package
โโโ test.tex % Usage demo
โโโ test.pdf % Rendered PDF output
โโโ README.md % You're reading it!
```---
## ๐ Use Cases
- Publishing reports with redacted content
- Hiding sensitive information in public slides
- Creating versions of a document with different privacy levels---
## ๐ License
This package is released under the MIT License. Free to use, modify, and distribute.
---
## โ๏ธ Author
Created by Yunqing Jia
GitHub: [@Yunqing-Jia](https://github.com/Yunqing-Jia)