function GenerateCryptKey($size = "", $secure = "", $numerals = "", $capitalize = "", $ambiguous = "", $symbols = "")
{
    // load library
    $pwgen = new SplClassLoader('Encryption\\PwGen', '../includes/libraries');
    $pwgen->register();
    $pwgen = new Encryption\PwGen\pwgen();
    // init
    if (!empty($size)) {
        $pwgen->setLength($size);
    }
    if (!empty($secure)) {
        $pwgen->setSecure($secure);
    }
    if (!empty($numerals)) {
        $pwgen->setNumerals($numerals);
    }
    if (!empty($capitalize)) {
        $pwgen->setCapitalize($capitalize);
    }
    if (!empty($ambiguous)) {
        $pwgen->setAmbiguous($ambiguous);
    }
    if (!empty($symbols)) {
        $pwgen->setSymbols($symbols);
    }
    // generate and send back
    return $pwgen->generate();
}