Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View asidpulse's full-sized avatar

asidpulse asidpulse

  • Monroe, LA
View GitHub Profile
@asidpulse
asidpulse / index.html
Created September 19, 2018 23:50
Responsive Numeric Keypad
<div class="keypadwrapper">
<div class="inputwrapper">
<span class="numberinput"></span>
<span class="numberinput"></span>
<span class="numberinput"></span>
<span class="numberinput"></span>
</div>
<div class="keypad">
<div id="lineone" class="numberline">
<div class="content">
@asidpulse
asidpulse / simple-nodejs-iv-encrypt-decrypt.js
Last active July 24, 2018 19:27 — forked from yoavniran/simple-nodejs-iv-encrypt-decrypt.js
nodejs crypto - simple encrypt & decrypt using IV (Initialization Vector)
"use strict";
var crypto = require("crypto");
var EncryptionHelper = (function () {
function getKeyAndIV(key, callback) {
crypto.pseudoRandomBytes(16, function (err, ivBuffer) {
var keyBuffer = (key instanceof Buffer) ? key : new Buffer(key) ;
@asidpulse
asidpulse / encrypt_decrypt_example.js
Last active July 23, 2018 22:11 — forked from erans/encrypt_decrypt_example.js
Example of encryption and decryption in node.js
var crypto = require("crypto")
function encrypt(key, data) {
var cipher = crypto.createCipher('aes-256-cbc', key);
var crypted = cipher.update(data, 'utf-8', 'hex');
crypted += cipher.final('hex');
return crypted;
}