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
function evpKDF($password, $salt, $keySize = 8, $ivSize = 4, $iterations = 1, $hashAlgorithm = "md5") { | |
$targetKeySize = $keySize + $ivSize; | |
$derivedBytes = ""; | |
$numberOfDerivedWords = 0; | |
$block = NULL; | |
$hasher = hash_init($hashAlgorithm); | |
while ($numberOfDerivedWords < $targetKeySize) { | |
if ($block != NULL) { | |
hash_update($hasher, $block); | |
} |
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
interface FormattedMessageProps { | |
message: string, | |
values?: { [key: string]: any; }; | |
} | |
export const formatMessage = ({ message, values = {} }: FormattedMessageProps) => { | |
const chunks = message.split(/({[^}]+})/g); | |
const formattedMessage = chunks.map(chunk => { | |
if (chunk.startsWith("{") && chunk.endsWith("}")) { | |
const key = chunk.slice(1,-1); |
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
import * as sq3 from "sqlite3"; | |
interface IRunFunction { | |
(sql: string): Promise<Database>; | |
(sql: string, ...params: any[]): Promise<Database>; | |
} | |
interface IGetFunction { | |
(sql: string): any; | |
(sql: string, ...params: any[]): any; |
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
Mozilla/5.0 (iPad; CPU OS 10_1_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Mobile/14B100 [FBAN/MessengerForiOS;FBAV/122.0.0.40.69;FBBV/61279955;FBDV/iPad4,1;FBMD/iPad;FBSN/iOS;FBSV/10.1.1;FBSS/2;FBCR/;FBID/tablet;FBLC/vi_VN;FBOP/5;FBRV/0] | |
Mozilla/5.0 (iPad; CPU OS 10_2 like Mac OS X) AppleWebKit/602.3.12 (KHTML, like Gecko) Mobile/14C92 [FBAN/MessengerForiOS;FBAV/100.1.0.36.68;FBBV/46154306;FBRV/0;FBDV/iPad4,1;FBMD/iPad;FBSN/iOS;FBSV/10.2;FBSS/2;FBCR/;FBID/tablet;FBLC/en_US;FBOP/5] | |
Mozilla/5.0 (iPad; CPU OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Mobile/14D27 [FBAN/MessengerForiOS;FBAV/100.1.0.36.68;FBBV/46154306;FBRV/0;FBDV/iPad5,3;FBMD/iPad;FBSN/iOS;FBSV/10.2.1;FBSS/2;FBCR/;FBID/tablet;FBLC/en_US;FBOP/5] | |
Mozilla/5.0 (iPad; CPU OS 9_3_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13E238 [FBAN/MessengerForiOS;FBAV/112.0.0.36.70;FBBV/54364624;FBDV/iPad4,4;FBMD/iPad;FBSN/iPhone OS;FBSV/9.3.1;FBSS/2;FBCR/;FBID/tablet;FBLC/en_US;FBOP/5;FBRV/0] | |
Mozilla/5.0 (iP |
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
{ | |
"AED": { | |
"name": "United Arab Emirates Dirham", | |
"symbol": "د.إ.", | |
"decimals": 2, | |
"code": "AED" | |
}, | |
"AFN": { | |
"name": "Afghan Afghani", | |
"symbol": "؋", |