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
| var crypto = require('crypto') | |
| , key = 'salt_from_the_user_document' | |
| , plaintext = 'password' | |
| , cipher = crypto.createCipher('aes-256-cbc', key) | |
| , decipher = crypto.createDecipher('aes-256-cbc', key); | |
| cipher.update(plaintext, 'utf8', 'base64'); | |
| var encryptedPassword = cipher.final('base64') | |
| decipher.update(encryptedPassword, 'base64', 'utf8'); |
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
| syntax on | |
| set number | |
| set hls | |
| set laststatus=2 | |
| set ignorecase | |
| set smartcase | |
| set wildmenu | |
| set paste | |
| set autoindent |