This file contains 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
<?php | |
// DEFINE our cipher | |
define('AES_256_CBC', 'aes-256-cbc'); | |
// Generate a 256-bit encryption key | |
// This should be stored somewhere instead of recreating it each time | |
$encryption_key = openssl_random_pseudo_bytes(32); | |
// Generate an initialization vector | |
// This *MUST* be available for decryption as well |
This file contains 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 http = require('https'); | |
// Create Slack channel -> Slack URL mapping | |
// This incoming webhook URL is provided when adding a Slack integration | |
var config = { | |
'#mychannel': 'https://hooks.slack.com/services/YOUR/SLACK/HOOK_HERE', | |
}; | |
/* | |
Convenience method to fetch the channel's URL |
OlderNewer