data-encryption by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill data-encryption使用行业标准的加密算法和密钥管理实践,为静态和传输中的敏感数据实施强大的加密策略。
最小工作示例:
// encryption-service.js
const crypto = require("crypto");
const fs = require("fs").promises;
class EncryptionService {
constructor() {
// AES-256-GCM for symmetric encryption
this.algorithm = "aes-256-gcm";
this.keyLength = 32; // 256 bits
this.ivLength = 16; // 128 bits
this.saltLength = 64;
this.tagLength = 16;
}
/**
* Generate a cryptographically secure random key
*/
generateKey() {
return crypto.randomBytes(this.keyLength);
}
/**
* Derive a key from a password using PBKDF2
*/
async deriveKey(password, salt = null) {
// ... (see reference guides for full implementation)
目录下的详细实现:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/| 指南 | 内容 |
|---|---|
| Node.js 加密库 | Node.js 加密库 |
| Python 加密实现 | Python 加密实现 |
| 数据库加密 (PostgreSQL) | 数据库加密 (PostgreSQL) |
| TLS/SSL 配置 | TLS/SSL 配置 |
每周安装数
141
代码仓库
GitHub 星标数
126
首次出现
2026年1月21日
安全审计
安装于
opencode116
gemini-cli114
codex111
claude-code104
cursor102
github-copilot98
Implement robust encryption strategies for protecting sensitive data at rest and in transit using industry-standard cryptographic algorithms and key management practices.
Minimal working example:
// encryption-service.js
const crypto = require("crypto");
const fs = require("fs").promises;
class EncryptionService {
constructor() {
// AES-256-GCM for symmetric encryption
this.algorithm = "aes-256-gcm";
this.keyLength = 32; // 256 bits
this.ivLength = 16; // 128 bits
this.saltLength = 64;
this.tagLength = 16;
}
/**
* Generate a cryptographically secure random key
*/
generateKey() {
return crypto.randomBytes(this.keyLength);
}
/**
* Derive a key from a password using PBKDF2
*/
async deriveKey(password, salt = null) {
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Node.js Encryption Library | Node.js Encryption Library |
| Python Cryptography Implementation | Python Cryptography Implementation |
| Database Encryption (PostgreSQL) | Database Encryption (PostgreSQL) |
| TLS/SSL Configuration | TLS/SSL Configuration |
Weekly Installs
141
Repository
GitHub Stars
126
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykFail
Installed on
opencode116
gemini-cli114
codex111
claude-code104
cursor102
github-copilot98
Azure RBAC 权限管理工具:查找最小角色、创建自定义角色与自动化分配
131,500 周安装
Railway数据库模板:一键部署PostgreSQL、Redis、MySQL、MongoDB数据库服务
204 周安装
邮件系统工程师最佳实践:提升送达率与反垃圾邮件策略指南
201 周安装
异步Python模式指南:asyncio并发编程、高性能非阻塞系统构建实践
204 周安装
Aeon 时间序列机器学习工具包:Python 时间序列分类、预测、异常检测与聚类
204 周安装
Kalshi 预测市场 API 与 Python SDK 使用指南 - 体育赛事数据分析与交易
212 周安装
Railway部署指南:使用railway up命令快速部署代码到Railway云平台
205 周安装