Skip to content

Instantly share code, notes, and snippets.

View devrsantos's full-sized avatar
🏠
Trabalhando em casa

Renan Augusto dos Santos devrsantos

🏠
Trabalhando em casa
View GitHub Profile
@devrsantos
devrsantos / encryption.js
Created May 21, 2019 20:40 — forked from vlucas/encryption.js
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bytes (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', new Buffer(ENCRYPTION_KEY), iv);
@devrsantos
devrsantos / README-Template.md
Created January 30, 2018 16:29 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites