feat: add AES-256-CBC encryption utility for sensitive data at rest#263
Open
DebasmitaBose0 wants to merge 1 commit into
Open
feat: add AES-256-CBC encryption utility for sensitive data at rest#263DebasmitaBose0 wants to merge 1 commit into
DebasmitaBose0 wants to merge 1 commit into
Conversation
- Create server/utils/encryption.js with encrypt() and decrypt() functions - Use Node.js built-in crypto module (no extra dependencies) - Derive 256-bit key from ENCRYPTION_KEY env var (supports raw 32-byte hex or auto-hashes shorter keys) - Use random 16-byte IV per encryption for semantic security - Store output as iv:hex format for safe DB/string storage - Include key generation command in error message for easy setup
|
@DebasmitaBose0 is attempting to deploy a commit to the srv30's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #251
Description
Creates a reusable server-side encryption/decryption module using standard Node.js native crypto libraries.
Changes
Uses AES-256-CBC with keys derived from the ENCRYPTION_KEY environment variable.
Implements a unique 16-byte random IV initialization vector per encryption for semantic security.
Formats output as iv:hex for secure string storage.