# security **Repository Path**: mirrors_svenanders/security ## Basic Information - **Project Name**: security - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-15 - **Last Updated**: 2026-01-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # @svenanders/security Node.js package for handling hashing of passwords and encryption/decryption of data * Encrypt and Decrypt Provide `ENCRYPTION_KEY` through env. ``` import {Encrypt, Decrypt} from "@svenanders/security" Encrypt(text_to_encrypt) // -> returns encrypted text Verify(encryped_text) // -> returns original text ``` * Hash and Verify Uses `pbkdf2Sync` and `sha512` ``` import {Hash, Verify} from "@svenanders/security" Hash(input_password) // -> {hash, salt} (to be stored in db) Verify(hash, input_password, salt) // -> true if input_password can be verified ``` * Email validation ``` import {ValidateEmail} from "@svenanders/security" ValidateEmail(email) // -> true if email validates ```