Skip to content

Instantly share code, notes, and snippets.

View reigelgallarde's full-sized avatar

Reigel Gallarde reigelgallarde

View GitHub Profile
<?php
/*
Plugin Name: Bot For WP
Description: Messenger bot for WordPress
Plugin URI: http://snypd.com/
Author: Sunny Luthra
Author URI: http://#
Version: 1.0
License: GPL2
*/
@reigelgallarde
reigelgallarde / encryption.js
Last active October 2, 2018 06:12 — forked from Tiriel/encryption.js
Symetric encryption/decryption for PHP and NodeJS communication
'use strict';
const crypto = require('crypto');
const AES_METHOD = 'aes-256-cbc';
const IV_LENGTH = 16; // For AES, this is always 16, checked with php
const password = 'lbwyBzfgzUIvXZFShJuikaWvLJhIVq36'; // Must be 256 bytes (32 characters)
function encrypt(text, password) {