# age > a simple, modern and secure file encryption tool, format, and Go library. **Published by:** [xyz](https://paragraph.com/@wardenyxz/) **Published on:** 2025-07-23 **URL:** https://paragraph.com/@wardenyxz/age ## Content age 是一个简单的加密工具,旨在提供一种安全、易用的方式来加密文件和数据。它的设计理念是简洁和高效,适合需要快速加密和解密的场景。生成密钥对$ age-keygen -o key.txt $ Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p加密文件 secrets.txt.age">$ age -r age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p secrets.txt > secrets.txt.age解密文件 secrets.txt">$ age -d -i key.txt secrets.txt.age > secrets.txt使用密码加密 secrets.txt.age">$ age -p secrets.txt > secrets.txt.age解密时输入密码 secrets.txt">$ age -d secrets.txt.age > secrets.txt密钥对加解密$ age -r age1t9xarklwwxyzcgftvc2m8s574lt4c0wl0ukgk7qmpl38ry3cruxs4f69r5 -o encrypted.age a.txt $ age -d -i key.txt -o decrypted.txt encrypted.age密码加解密$ age --passphrase -o encrypt.age a.txt $ age --decrypt -o a.txt encrypt.age ## Publication Information - [xyz](https://paragraph.com/@wardenyxz/): Publication homepage - [All Posts](https://paragraph.com/@wardenyxz/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@wardenyxz): Subscribe to updates