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
<?php | |
// use to generate key : 'openssl rand -hex 32' | |
function my_encrypt($data, $passphrase) { | |
$secret_key = hex2bin($passphrase); | |
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc')); | |
$encrypted_64 = openssl_encrypt($data, 'aes-256-cbc', $secret_key, 0, $iv); | |
$iv_64 = base64_encode($iv); | |
$json = new stdClass(); | |
$json->iv = $iv_64; |
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
# This list contains all the attributes listed in | |
# http://docs.python.org/library/logging.html#logrecord-attributes | |
LOG_RECORD_ATTRIBUTES = { | |
'args', 'asctime', 'created', 'exc_info', 'exc_text', 'filename', | |
'funcName', 'levelname', 'levelno', 'lineno', 'message', 'module', | |
'msecs', 'msg', 'name', 'pathname', 'process', 'processName', | |
'relativeCreated', 'stack_info', 'thread', 'threadName', | |
} | |
BASIC_TYPES = (str, bool, int, float, type(None)) |
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
if (History && History.enabled) { | |
// START OF WRAPPER SECTION | |
var HistoryWrapper = { | |
apiEventInProgress: false, | |
isBrowserEvent: function () { | |
return !this.apiEventInProgress; | |
}, |